fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: changes to closure capture in Rust 2021 will affect drop order 2 --> $DIR/precise.rs:20:13 3 | 4LL | let c = || { 5 | ^^ 6... 7LL | let _t = t.0; 8 | --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0` 9... 10LL | } 11 | - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure 12 | 13 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> 14note: the lint level is defined here 15 --> $DIR/precise.rs:3:9 16 | 17LL | #![deny(rust_2021_incompatible_closure_captures)] 18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 19help: add a dummy let to cause `t` to be fully captured 20 | 21LL ~ let c = || { 22LL + let _ = &t; 23 | 24 25error: changes to closure capture in Rust 2021 will affect drop order 26 --> $DIR/precise.rs:45:13 27 | 28LL | let c = || { 29 | ^^ 30... 31LL | let _x = u.0.0; 32 | ----- in Rust 2018, this closure captures all of `u`, but in Rust 2021, it will only capture `u.0.0` 33LL | 34LL | let _x = u.0.1; 35 | ----- in Rust 2018, this closure captures all of `u`, but in Rust 2021, it will only capture `u.0.1` 36LL | 37LL | let _x = u.1.0; 38 | ----- in Rust 2018, this closure captures all of `u`, but in Rust 2021, it will only capture `u.1.0` 39... 40LL | } 41 | - 42 | | 43 | in Rust 2018, `u` is dropped here, but in Rust 2021, only `u.0.0` will be dropped here as part of the closure 44 | in Rust 2018, `u` is dropped here, but in Rust 2021, only `u.0.1` will be dropped here as part of the closure 45 | in Rust 2018, `u` is dropped here, but in Rust 2021, only `u.1.0` will be dropped here as part of the closure 46 | 47 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> 48help: add a dummy let to cause `u` to be fully captured 49 | 50LL ~ let c = || { 51LL + let _ = &u; 52 | 53 54error: aborting due to 2 previous errors 55