]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/large_moves.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / async-await / large_moves.rs
CommitLineData
cdc7bbd5
XL
1#![deny(large_assignments)]
2#![feature(large_assignments)]
94222f64 3#![cfg_attr(attribute, move_size_limit = "1000")]
cdc7bbd5
XL
4// build-fail
5// only-x86_64
94222f64
XL
6// revisions: attribute option
7// [option]compile-flags: -Zmove-size-limit=1000
cdc7bbd5
XL
8
9// edition:2018
487cf647 10// compile-flags: -Zmir-opt-level=0
cdc7bbd5
XL
11
12fn main() {
13 let x = async { //~ ERROR large_assignments
14 let y = [0; 9999];
15 dbg!(y);
16 thing(&y).await;
17 dbg!(y);
18 };
19 let z = (x, 42); //~ ERROR large_assignments
20 //~^ ERROR large_assignments
21 let a = z.0; //~ ERROR large_assignments
22 let b = z.1;
23}
24
25async fn thing(y: &[u8]) {
26 dbg!(y);
27}