1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:25:13
|
LL | let c = || {
| ^^
...
LL | let _t = t.0;
| --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0`
LL |
LL | let _t1 = t1.0;
| ---- in Rust 2018, this closure captures all of `t1`, but in Rust 2021, it will only capture `t1.0`
LL |
LL | let _t2 = t2.0;
| ---- in Rust 2018, this closure captures all of `t2`, but in Rust 2021, it will only capture `t2.0`
...
LL | }
| -
| |
| in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure
| in Rust 2018, `t1` is dropped here, but in Rust 2021, only `t1.0` will be dropped here as part of the closure
| in Rust 2018, `t2` is dropped here, but in Rust 2021, only `t2.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/significant_drop.rs:2:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured
|
LL ~ let c = || {
LL + let _ = (&t, &t1, &t2);
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:50:13
|
LL | let c = || {
| ^^
...
LL | let _t = t.0;
| --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0`
LL |
LL | let _t1 = t1.0;
| ---- in Rust 2018, this closure captures all of `t1`, but in Rust 2021, it will only capture `t1.0`
...
LL | }
| -
| |
| in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure
| in Rust 2018, `t1` is dropped here, but in Rust 2021, only `t1.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `t`, `t1` to be fully captured
|
LL ~ let c = || {
LL + let _ = (&t, &t1);
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:71:13
|
LL | let c = || {
| ^^
...
LL | let _t = t.0;
| --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0`
...
LL | }
| - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `t` to be fully captured
|
LL ~ let c = || {
LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:91:13
|
LL | let c = || {
| ^^
...
LL | let _t = t.0;
| --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0`
...
LL | }
| - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `t` to be fully captured
|
LL ~ let c = || {
LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:109:13
|
LL | let c = || {
| ^^
...
LL | let _t = t.0;
| --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0`
...
LL | }
| - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `t` to be fully captured
|
LL ~ let c = || {
LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:125:13
|
LL | let c = || {
| ^^
...
LL | let _t = t.1;
| --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.1`
...
LL | }
| - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.1` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `t` to be fully captured
|
LL ~ let c = || {
LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:143:13
|
LL | let c = move || {
| ^^^^^^^
...
LL | println!("{:?} {:?}", t1.1, t.1);
| ---- --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.1`
| |
| in Rust 2018, this closure captures all of `t1`, but in Rust 2021, it will only capture `t1.1`
...
LL | }
| -
| |
| in Rust 2018, `t1` is dropped here, but in Rust 2021, only `t1.1` will be dropped here as part of the closure
| in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.1` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `t1`, `t` to be fully captured
|
LL ~ let c = move || {
LL + let _ = (&t1, &t);
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:163:21
|
LL | let c = || {
| ^^
...
LL | tuple.0;
| ------- in Rust 2018, this closure captures all of `tuple`, but in Rust 2021, it will only capture `tuple.0`
...
LL | }
| - in Rust 2018, `tuple` is dropped here, but in Rust 2021, only `tuple.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `tuple` to be fully captured
|
LL ~ let c = || {
LL + let _ = &tuple;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:181:17
|
LL | let c = || {
| ^^
...
LL | tuple.0;
| ------- in Rust 2018, this closure captures all of `tuple`, but in Rust 2021, it will only capture `tuple.0`
...
LL | };
| - in Rust 2018, `tuple` is dropped here, but in Rust 2021, only `tuple.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `tuple` to be fully captured
|
LL ~ let c = || {
LL + let _ = &tuple;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:201:18
|
LL | let _c = || tup.0;
| ^^ ----- in Rust 2018, this closure captures all of `tup`, but in Rust 2021, it will only capture `tup.0`
...
LL | }
| - in Rust 2018, `tup` is dropped here, but in Rust 2021, only `tup.0` will be dropped here as part of the closure
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
help: add a dummy let to cause `tup` to be fully captured
|
LL | let _c = || { let _ = &tup; tup.0 };
| +++++++++++++++ +
error: aborting due to 10 previous errors
|