diff --git a/src/model_03.rs b/src/model_03.rs index a054a4e..25b1e81 100644 --- a/src/model_03.rs +++ b/src/model_03.rs @@ -271,3 +271,12 @@ fn with_futures() { let x = futures::executor::block_on(x.into_future_()).into_::(); assert_eq!(x, 10); } + +#[test] +fn doubly_futures() { + type U = Composition; + let x = generic_test::(); + let x = futures::executor::block_on(async { x.into_future_().await.into_future_().await }) + .into_::(); + assert_eq!(x, 10); +}