1 error: changes to closure capture in Rust 2021 will affect drop order and which traits the closure implements
2 --> $DIR/multi_diagnostics.rs:37:13
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`
8 | ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
11 | ---- in Rust 2018, this closure captures all of `f2`, but in Rust 2021, it will only capture `f2.1`
14 | - in Rust 2018, `f2` is dropped here, but in Rust 2021, only `f2.1` will be dropped here as part of the closure
16 note: the lint level is defined here
17 --> $DIR/multi_diagnostics.rs:2:9
19 LL | #![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>
22 help: add a dummy let to cause `f1`, `f2` to be fully captured
25 LL + let _ = (&f1, &f2);
28 error: changes to closure capture in Rust 2021 will affect which traits the closure implements
29 --> $DIR/multi_diagnostics.rs:56:13
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`
35 | ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
37 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
38 help: add a dummy let to cause `f1` to be fully captured
44 error: changes to closure capture in Rust 2021 will affect which traits the closure implements
45 --> $DIR/multi_diagnostics.rs:81:13
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`
54 | ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
57 | ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.2`
59 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
60 help: add a dummy let to cause `f1` to be fully captured
66 error: changes to closure capture in Rust 2021 will affect drop order and which traits the closure implements
67 --> $DIR/multi_diagnostics.rs:100:13
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`
73 | ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.0`
76 | ---- in Rust 2018, this closure captures all of `f1`, but in Rust 2021, it will only capture `f1.1`
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
84 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
85 help: add a dummy let to cause `f1` to be fully captured
91 error: changes to closure capture in Rust 2021 will affect which traits the closure implements
92 --> $DIR/multi_diagnostics.rs:133:19
94 LL | thread::spawn(move || unsafe {
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`
101 LL | *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`
105 | -------- in Rust 2018, this closure captures all of `fptr2`, but in Rust 2021, it will only capture `fptr2.0`
107 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
108 help: add a dummy let to cause `fptr1`, `fptr2` to be fully captured
110 LL ~ thread::spawn(move || { let _ = (&fptr1, &fptr2); unsafe {
118 error: aborting due to 5 previous errors