2021-03-26 13:39:04 +00:00
|
|
|
#![deny(large_assignments)]
|
2021-03-26 16:28:52 +00:00
|
|
|
#![feature(large_assignments)]
|
2021-06-19 00:00:00 +00:00
|
|
|
#![cfg_attr(attribute, move_size_limit = "1000")]
|
2021-03-26 13:39:04 +00:00
|
|
|
// build-fail
|
2021-03-29 14:22:01 +00:00
|
|
|
// only-x86_64
|
2021-06-19 00:00:00 +00:00
|
|
|
// revisions: attribute option
|
|
|
|
// [option]compile-flags: -Zmove-size-limit=1000
|
2021-03-26 13:39:04 +00:00
|
|
|
|
|
|
|
// edition:2018
|
2022-04-24 17:34:24 -04:00
|
|
|
// compile-flags: -Zmir-opt-level=0
|
2021-03-26 13:39:04 +00:00
|
|
|
|
|
|
|
fn main() {
|
2022-11-24 17:58:32 +01:00
|
|
|
let x = async {
|
2021-03-26 13:39:04 +00:00
|
|
|
let y = [0; 9999];
|
|
|
|
dbg!(y);
|
|
|
|
thing(&y).await;
|
|
|
|
dbg!(y);
|
|
|
|
};
|
|
|
|
let z = (x, 42); //~ ERROR large_assignments
|
|
|
|
//~^ ERROR large_assignments
|
|
|
|
let a = z.0; //~ ERROR large_assignments
|
|
|
|
let b = z.1;
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn thing(y: &[u8]) {
|
|
|
|
dbg!(y);
|
2021-03-26 16:33:14 +00:00
|
|
|
}
|