]>
Commit | Line | Data |
---|---|---|
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 | |
12 | fn 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 | ||
25 | async fn thing(y: &[u8]) { | |
26 | dbg!(y); | |
27 | } |