Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRustasync/await state machineSingle-choice MCQ

Consider this async function. After the desugaring into a state machine, why is this future `!Unpin`, and what is the concrete reason `Pin` is required to poll it safely?

async fn f() { let buf = String::from("hello"); let r = &buf; some_async_op().await; println!("{}", r); }