1error: changes to closure capture in Rust 2021 will affect drop order and which traits the closure implements
2  --> $DIR/multi_diagnostics.rs:37:13
3   |
4LL |     let c = || {
5   |             ^^ in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.0` does not implement `Clone`
6...
7LL |         let _f_1 = f1.0;
8   |                    ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
9LL |
10LL |         let _f_2 = f2.1;
11   |                    ---- in Rust 2018, this closure captures all of `f2`, but in Rust 2021, it will only capture `f2.1`
12...
13LL | }
14   | - in Rust 2018, `f2` is dropped here, but in Rust 2021, only `f2.1` will be dropped here as part of the closure
15   |
16note: the lint level is defined here
17  --> $DIR/multi_diagnostics.rs:2:9
18   |
19LL | #![deny(rust_2021_incompatible_closure_captures)]
20   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
22help: add a dummy let to cause `f1`, `f2` to be fully captured
23   |
24LL ~     let c = || {
25LL +         let _ = (&f1, &f2);
26   |
27
28error: changes to closure capture in Rust 2021 will affect which traits the closure implements
29  --> $DIR/multi_diagnostics.rs:56:13
30   |
31LL |     let c = || {
32   |             ^^ in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.0` does not implement `Clone`
33...
34LL |         let _f_1 = f1.0;
35   |                    ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
36   |
37   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
38help: add a dummy let to cause `f1` to be fully captured
39   |
40LL ~     let c = || {
41LL +         let _ = &f1;
42   |
43
44error: changes to closure capture in Rust 2021 will affect which traits the closure implements
45  --> $DIR/multi_diagnostics.rs:81:13
46   |
47LL |     let c = || {
48   |             ^^
49   |             |
50   |             in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.0` does not implement `Clone`
51   |             in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.2` does not implement `Clone`
52...
53LL |         let _f_0 = f1.0;
54   |                    ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
55LL |
56LL |         let _f_2 = f1.2;
57   |                    ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.2`
58   |
59   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
60help: add a dummy let to cause `f1` to be fully captured
61   |
62LL ~     let c = || {
63LL +         let _ = &f1;
64   |
65
66error: changes to closure capture in Rust 2021 will affect drop order and which traits the closure implements
67  --> $DIR/multi_diagnostics.rs:100:13
68   |
69LL |     let c = || {
70   |             ^^ in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.0` does not implement `Clone`
71...
72LL |         let _f_0 = f1.0;
73   |                    ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
74LL |
75LL |         let _f_1 = f1.1;
76   |                    ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.1`
77...
78LL | }
79   | -
80   | |
81   | in Rust 2018, `f1` is dropped here, but in Rust 2021, only `f1.0` will be dropped here as part of the closure
82   | in Rust 2018, `f1` is dropped here, but in Rust 2021, only `f1.1` will be dropped here as part of the closure
83   |
84   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
85help: add a dummy let to cause `f1` to be fully captured
86   |
87LL ~     let c = || {
88LL +         let _ = &f1;
89   |
90
91error: changes to closure capture in Rust 2021 will affect which traits the closure implements
92  --> $DIR/multi_diagnostics.rs:133:19
93   |
94LL |     thread::spawn(move || unsafe {
95   |                   ^^^^^^^^^^^^^^
96   |                   |
97   |                   in Rust 2018, this closure implements `Sync` as `fptr1` implements `Sync`, but in Rust 2021, this closure will no longer implement `Sync` because `fptr1` is not fully captured and `fptr1.0.0` does not implement `Sync`
98   |                   in Rust 2018, this closure implements `Send` as `fptr1` implements `Send`, but in Rust 2021, this closure will no longer implement `Send` because `fptr1` is not fully captured and `fptr1.0.0` does not implement `Send`
99   |                   in Rust 2018, this closure implements `Send` as `fptr2` implements `Send`, but in Rust 2021, this closure will no longer implement `Send` because `fptr2` is not fully captured and `fptr2.0` does not implement `Send`
100...
101LL |         *fptr1.0.0 = 20;
102   |         ---------- in Rust 2018, this closure captures all of `fptr1`, but in Rust 2021, it will only capture `fptr1.0.0`
103LL |
104LL |         *fptr2.0 = 20;
105   |         -------- in Rust 2018, this closure captures all of `fptr2`, but in Rust 2021, it will only capture `fptr2.0`
106   |
107   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
108help: add a dummy let to cause `fptr1`, `fptr2` to be fully captured
109   |
110LL ~     thread::spawn(move || { let _ = (&fptr1, &fptr2); unsafe {
111LL |
112LL |
113LL |
114LL |
115LL |
116 ...
117
118error: aborting due to 5 previous errors
119
120