1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#![feature(coroutines)] use std::future::ready; use stream_future::*; #[tokio::test] async fn nested() { #[stream] async fn foo() { yield; async { ready(1).await }.await; yield; } foo().await; }