File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed
compiler/rustc_lint_defs/src Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -1657,10 +1657,11 @@ declare_lint! {
16571657 Allow ,
16581658 "detects `mut x` bindings that change the type of `x`" ,
16591659 @feature_gate = sym:: mut_dont_reset_binding_mode_2024;
1660- @future_incompatible = FutureIncompatibleInfo {
1660+ // FIXME uncomment below upon stabilization
1661+ /*@future_incompatible = FutureIncompatibleInfo {
16611662 reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
16621663 reference: "123076",
1663- } ;
1664+ };*/
16641665}
16651666
16661667declare_lint ! {
Original file line number Diff line number Diff line change @@ -8,11 +8,9 @@ struct Foo(u8);
88fn main ( ) {
99 let Foo ( mut a) = & Foo ( 0 ) ;
1010 //~^ ERROR: dereferencing `mut` binding
11- //~| WARN: this changes meaning in Rust 2024
1211 a = 42 ;
1312
1413 let Foo ( mut a) = & mut Foo ( 0 ) ;
1514 //~^ ERROR: dereferencing `mut` binding
16- //~| WARN: this changes meaning in Rust 2024
1715 a = 42 ;
1816}
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ error: dereferencing `mut` binding
44LL | let Foo(mut a) = &Foo(0);
55 | ^^^^^ `mut` dereferences the type of this binding
66 |
7- = warning: this changes meaning in Rust 2024
8- = note: for more information, see 123076
97help: this will change in edition 2024
108 --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:9:13
119 |
@@ -18,15 +16,13 @@ LL | #![forbid(dereferencing_mut_binding)]
1816 | ^^^^^^^^^^^^^^^^^^^^^^^^^
1917
2018error: 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
2220 |
2321LL | let Foo(mut a) = &mut Foo(0);
2422 | ^^^^^ `mut` dereferences the type of this binding
2523 |
26- = warning: this changes meaning in Rust 2024
27- = note: for more information, see 123076
2824help: 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
3026 |
3127LL | let Foo(mut a) = &mut Foo(0);
3228 | ^^^^^
You can’t perform that action at this time.
0 commit comments