File tree 3 files changed +5
-10
lines changed
compiler/rustc_lint_defs/src
3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -1657,10 +1657,11 @@ declare_lint! {
1657
1657
Allow ,
1658
1658
"detects `mut x` bindings that change the type of `x`" ,
1659
1659
@feature_gate = sym:: mut_dont_reset_binding_mode_2024;
1660
- @future_incompatible = FutureIncompatibleInfo {
1660
+ // FIXME uncomment below upon stabilization
1661
+ /*@future_incompatible = FutureIncompatibleInfo {
1661
1662
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
1662
1663
reference: "123076",
1663
- } ;
1664
+ };*/
1664
1665
}
1665
1666
1666
1667
declare_lint ! {
Original file line number Diff line number Diff line change @@ -8,11 +8,9 @@ struct Foo(u8);
8
8
fn main ( ) {
9
9
let Foo ( mut a) = & Foo ( 0 ) ;
10
10
//~^ ERROR: dereferencing `mut` binding
11
- //~| WARN: this changes meaning in Rust 2024
12
11
a = 42 ;
13
12
14
13
let Foo ( mut a) = & mut Foo ( 0 ) ;
15
14
//~^ ERROR: dereferencing `mut` binding
16
- //~| WARN: this changes meaning in Rust 2024
17
15
a = 42 ;
18
16
}
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ error: dereferencing `mut` binding
4
4
LL | let Foo(mut a) = &Foo(0);
5
5
| ^^^^^ `mut` dereferences the type of this binding
6
6
|
7
- = warning: this changes meaning in Rust 2024
8
- = note: for more information, see 123076
9
7
help: this will change in edition 2024
10
8
--> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:9:13
11
9
|
@@ -18,15 +16,13 @@ LL | #![forbid(dereferencing_mut_binding)]
18
16
| ^^^^^^^^^^^^^^^^^^^^^^^^^
19
17
20
18
error: dereferencing `mut` binding
21
- --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:14 :13
19
+ --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:13 :13
22
20
|
23
21
LL | let Foo(mut a) = &mut Foo(0);
24
22
| ^^^^^ `mut` dereferences the type of this binding
25
23
|
26
- = warning: this changes meaning in Rust 2024
27
- = note: for more information, see 123076
28
24
help: this will change in edition 2024
29
- --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:14 :13
25
+ --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:13 :13
30
26
|
31
27
LL | let Foo(mut a) = &mut Foo(0);
32
28
| ^^^^^
You can’t perform that action at this time.
0 commit comments