@@ -2,7 +2,10 @@ error: binding modifiers may only be written when the default binding mode is `m
22 --> $DIR/migration_lint.rs:25:13
33 |
44LL | let Foo(mut x) = &Foo(0);
5- | ^^^ default binding mode is `ref`
5+ | ^^^--
6+ | |
7+ | this binding modifier
8+ | default binding mode is `ref`
69 |
710 = warning: this changes meaning in Rust 2024
811 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -20,7 +23,10 @@ error: binding modifiers may only be written when the default binding mode is `m
2023 --> $DIR/migration_lint.rs:30:13
2124 |
2225LL | let Foo(mut x) = &mut Foo(0);
23- | ^^^ default binding mode is `ref mut`
26+ | ^^^--
27+ | |
28+ | this binding modifier
29+ | default binding mode is `ref mut`
2430 |
2531 = warning: this changes meaning in Rust 2024
2632 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -33,7 +39,10 @@ error: binding modifiers may only be written when the default binding mode is `m
3339 --> $DIR/migration_lint.rs:35:13
3440 |
3541LL | let Foo(ref x) = &Foo(0);
36- | ^^^ default binding mode is `ref`
42+ | ^^^--
43+ | |
44+ | this binding modifier
45+ | default binding mode is `ref`
3746 |
3847 = warning: this changes meaning in Rust 2024
3948 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -46,7 +55,10 @@ error: binding modifiers may only be written when the default binding mode is `m
4655 --> $DIR/migration_lint.rs:40:13
4756 |
4857LL | let Foo(ref x) = &mut Foo(0);
49- | ^^^ default binding mode is `ref mut`
58+ | ^^^--
59+ | |
60+ | this binding modifier
61+ | default binding mode is `ref mut`
5062 |
5163 = warning: this changes meaning in Rust 2024
5264 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -59,7 +71,10 @@ error: reference patterns may only be written when the default binding mode is `
5971 --> $DIR/migration_lint.rs:57:13
6072 |
6173LL | let Foo(&x) = &Foo(&0);
62- | ^ default binding mode is `ref`
74+ | ^-
75+ | |
76+ | this reference pattern
77+ | default binding mode is `ref`
6378 |
6479 = warning: this changes meaning in Rust 2024
6580 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -72,7 +87,10 @@ error: reference patterns may only be written when the default binding mode is `
7287 --> $DIR/migration_lint.rs:62:13
7388 |
7489LL | let Foo(&mut x) = &Foo(&mut 0);
75- | ^^^^ default binding mode is `ref`
90+ | ^^^^--
91+ | |
92+ | this reference pattern
93+ | default binding mode is `ref`
7694 |
7795 = warning: this changes meaning in Rust 2024
7896 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -85,7 +103,10 @@ error: reference patterns may only be written when the default binding mode is `
85103 --> $DIR/migration_lint.rs:67:13
86104 |
87105LL | let Foo(&x) = &mut Foo(&0);
88- | ^ default binding mode is `ref mut`
106+ | ^-
107+ | |
108+ | this reference pattern
109+ | default binding mode is `ref mut`
89110 |
90111 = warning: this changes meaning in Rust 2024
91112 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -98,7 +119,10 @@ error: reference patterns may only be written when the default binding mode is `
98119 --> $DIR/migration_lint.rs:72:13
99120 |
100121LL | let Foo(&mut x) = &mut Foo(&mut 0);
101- | ^^^^ default binding mode is `ref mut`
122+ | ^^^^--
123+ | |
124+ | this reference pattern
125+ | default binding mode is `ref mut`
102126 |
103127 = warning: this changes meaning in Rust 2024
104128 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -111,7 +135,10 @@ error: reference patterns may only be written when the default binding mode is `
111135 --> $DIR/migration_lint.rs:81:17
112136 |
113137LL | if let Some(&x) = &&&&&Some(&0u8) {
114- | ^ default binding mode is `ref`
138+ | ^-
139+ | |
140+ | this reference pattern
141+ | default binding mode is `ref`
115142 |
116143 = warning: this changes meaning in Rust 2024
117144 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -124,7 +151,10 @@ error: reference patterns may only be written when the default binding mode is `
124151 --> $DIR/migration_lint.rs:87:17
125152 |
126153LL | if let Some(&mut x) = &&&&&Some(&mut 0u8) {
127- | ^^^^ default binding mode is `ref`
154+ | ^^^^--
155+ | |
156+ | this reference pattern
157+ | default binding mode is `ref`
128158 |
129159 = warning: this changes meaning in Rust 2024
130160 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -137,7 +167,10 @@ error: reference patterns may only be written when the default binding mode is `
137167 --> $DIR/migration_lint.rs:93:17
138168 |
139169LL | if let Some(&x) = &&&&&mut Some(&0u8) {
140- | ^ default binding mode is `ref`
170+ | ^-
171+ | |
172+ | this reference pattern
173+ | default binding mode is `ref`
141174 |
142175 = warning: this changes meaning in Rust 2024
143176 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -150,7 +183,10 @@ error: reference patterns may only be written when the default binding mode is `
150183 --> $DIR/migration_lint.rs:99:17
151184 |
152185LL | if let Some(&mut Some(Some(x))) = &mut Some(&mut Some(&mut Some(0u8))) {
153- | ^^^^ default binding mode is `ref mut`
186+ | ^^^^--------------
187+ | |
188+ | this reference pattern
189+ | default binding mode is `ref mut`
154190 |
155191 = warning: this changes meaning in Rust 2024
156192 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -163,7 +199,10 @@ error: binding modifiers may only be written when the default binding mode is `m
163199 --> $DIR/migration_lint.rs:111:21
164200 |
165201LL | let Struct { a, mut b, c } = &Struct { a: 0, b: 0, c: 0 };
166- | ^^^ default binding mode is `ref`
202+ | ^^^--
203+ | |
204+ | this binding modifier
205+ | default binding mode is `ref`
167206 |
168207 = warning: this changes meaning in Rust 2024
169208 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -176,8 +215,11 @@ error: binding modifiers and reference patterns may only be written when the def
176215 --> $DIR/migration_lint.rs:117:21
177216 |
178217LL | let Struct { a: &a, b, ref c } = &Struct { a: &0, b: &0, c: &0 };
179- | ^ ^^^ default binding mode is `ref`
180- | |
218+ | ^- ^^^--
219+ | | |
220+ | | this binding modifier
221+ | | default binding mode is `ref`
222+ | this reference pattern
181223 | default binding mode is `ref`
182224 |
183225 = warning: this changes meaning in Rust 2024
@@ -191,8 +233,11 @@ error: reference patterns may only be written when the default binding mode is `
191233 --> $DIR/migration_lint.rs:124:24
192234 |
193235LL | if let Struct { a: &Some(a), b: Some(&b), c: Some(c) } =
194- | ^ ^ default binding mode is `ref`
195- | |
236+ | ^------- ^-
237+ | | |
238+ | | this reference pattern
239+ | | default binding mode is `ref`
240+ | this reference pattern
196241 | default binding mode is `ref`
197242 |
198243 = warning: this changes meaning in Rust 2024
@@ -206,8 +251,9 @@ error: binding modifiers may only be written when the default binding mode is `m
206251 --> $DIR/migration_lint.rs:137:15
207252 |
208253LL | (Some(mut x), migration_lint_macros::mixed_edition_pat!(y)) => {
209- | ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ occurs within macro expansion
254+ | ^^^-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ occurs within macro expansion
210255 | |
256+ | this binding modifier
211257 | default binding mode is `ref`
212258 |
213259 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
@@ -221,8 +267,11 @@ error: binding modifiers and reference patterns may only be written when the def
221267 --> $DIR/migration_lint.rs:145:10
222268 |
223269LL | let [&mut [ref a]] = &mut [&mut &[0]];
224- | ^^^^ ^^^ default binding mode is `ref`
225- | |
270+ | ^^^^--^^^---
271+ | | |
272+ | | this binding modifier
273+ | | default binding mode is `ref`
274+ | this reference pattern
226275 | default binding mode is `ref mut`
227276 |
228277 = warning: this changes meaning in Rust 2024
@@ -236,7 +285,10 @@ error: reference patterns may only be written when the default binding mode is `
236285 --> $DIR/migration_lint.rs:150:10
237286 |
238287LL | let [&(_)] = &[&0];
239- | ^^ default binding mode is `ref`
288+ | ^^--
289+ | |
290+ | this reference pattern
291+ | default binding mode is `ref`
240292 |
241293 = warning: this changes meaning in Rust 2024
242294 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/match-ergonomics.html>
0 commit comments