fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// edition:2018 2// run-rustfix 3 4fn test_boxed() -> Box<impl std::future::Future<Output = u32>> { 5 let x = 0u32; 6 Box::new(async move { x } ) 7 //~^ ERROR E0373 8} 9 10fn test_ref(x: &u32) -> impl std::future::Future<Output = u32> + '_ { 11 async move { *x } 12 //~^ ERROR E0373 13} 14 15fn main() { 16 let _ = test_boxed(); 17 let _ = test_ref(&0u32); 18}