]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/large_moves.rs
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07
[rust.git] / src / test / ui / async-await / large_moves.rs
1 #![deny(large_assignments)]
2 #![feature(large_assignments)]
3 #![move_size_limit = "1000"]
4 // build-fail
5 // only-x86_64
6
7 // edition:2018
8
9 fn main() {
10     let x = async { //~ ERROR large_assignments
11         let y = [0; 9999];
12         dbg!(y);
13         thing(&y).await;
14         dbg!(y);
15     };
16     let z = (x, 42); //~ ERROR large_assignments
17     //~^ ERROR large_assignments
18     let a = z.0; //~ ERROR large_assignments
19     let b = z.1;
20 }
21
22 async fn thing(y: &[u8]) {
23     dbg!(y);
24 }