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

Consider the future size implication of holding a non-`Send` value across an await. Why does the code below make the resulting future `!Send`, and at which boundary does the compiler detect it?

use std::rc::Rc; async fn work() { let r = Rc::new(5); some_async().await; println!("{}", r); } async fn some_async() {}