]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/large_moves.rs
remove [async output] from impl Future
[rust.git] / src / test / ui / async-await / large_moves.rs
1 #![deny(large_assignments)]
2 #![feature(large_assignments)]
3 #![cfg_attr(attribute, move_size_limit = "1000")]
4 // build-fail
5 // only-x86_64
6 // revisions: attribute option
7 // [option]compile-flags: -Zmove-size-limit=1000
8
9 // edition:2018
10
11 fn main() {
12     let x = async { //~ ERROR large_assignments
13         let y = [0; 9999];
14         dbg!(y);
15         thing(&y).await;
16         dbg!(y);
17     };
18     let z = (x, 42); //~ ERROR large_assignments
19     //~^ ERROR large_assignments
20     let a = z.0; //~ ERROR large_assignments
21     let b = z.1;
22 }
23
24 async fn thing(y: &[u8]) {
25     dbg!(y);
26 }