diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index bc36a587a9e..5859f7b4319 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -1657,10 +1657,11 @@ declare_lint! { Allow, "detects `mut x` bindings that change the type of `x`", @feature_gate = sym::mut_dont_reset_binding_mode_2024; - @future_incompatible = FutureIncompatibleInfo { + // FIXME uncomment below upon stabilization + /*@future_incompatible = FutureIncompatibleInfo { reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024), reference: "123076", - }; + };*/ } declare_lint! { diff --git a/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.rs b/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.rs index 2992e61fbbc..2e8a82d12cd 100644 --- a/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.rs +++ b/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.rs @@ -8,11 +8,9 @@ struct Foo(u8); fn main() { let Foo(mut a) = &Foo(0); //~^ ERROR: dereferencing `mut` binding - //~| WARN: this changes meaning in Rust 2024 a = 42; let Foo(mut a) = &mut Foo(0); //~^ ERROR: dereferencing `mut` binding - //~| WARN: this changes meaning in Rust 2024 a = 42; } diff --git a/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.stderr b/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.stderr index 72b72f0df5d..4db775f0f51 100644 --- a/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.stderr +++ b/tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.stderr @@ -4,8 +4,6 @@ error: dereferencing `mut` binding LL | let Foo(mut a) = &Foo(0); | ^^^^^ `mut` dereferences the type of this binding | - = warning: this changes meaning in Rust 2024 - = note: for more information, see 123076 help: this will change in edition 2024 --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:9:13 | @@ -18,15 +16,13 @@ LL | #![forbid(dereferencing_mut_binding)] | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: dereferencing `mut` binding - --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:14:13 + --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:13:13 | LL | let Foo(mut a) = &mut Foo(0); | ^^^^^ `mut` dereferences the type of this binding | - = warning: this changes meaning in Rust 2024 - = note: for more information, see 123076 help: this will change in edition 2024 - --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:14:13 + --> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:13:13 | LL | let Foo(mut a) = &mut Foo(0); | ^^^^^