fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
356 B18 linesraw
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}