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

What does this code reveal about how the compiler lays out an `async fn` state machine across await points?

async fn do_io() {} async fn work() -> u64 { let big = [1u8; 1024]; let s: u64 = big.iter().map(|&b| b as u64).sum(); do_io().await; // big is dead here s }