Skip to content

Commit 2b44689

Browse files
Temporarily remove future compatibility label from migration lint
The lint is unstable, and the lint group `rust_2024_compatibility` must keep working on stable
1 parent aa4ffd8 commit 2b44689

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,10 +1656,11 @@ declare_lint! {
16561656
Allow,
16571657
"detects `mut x` bindings that change the type of `x`",
16581658
@feature_gate = sym::mut_dont_reset_binding_mode_2024;
1659-
@future_incompatible = FutureIncompatibleInfo {
1659+
// FIXME uncomment below upon stabilization
1660+
/*@future_incompatible = FutureIncompatibleInfo {
16601661
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
16611662
reference: "123076",
1662-
};
1663+
};*/
16631664
}
16641665

16651666
declare_lint! {

tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ struct Foo(u8);
88
fn 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
}

tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.stderr

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ error: dereferencing `mut` binding
44
LL | 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
97
help: 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

2018
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
2220
|
2321
LL | 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
2824
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
3026
|
3127
LL | let Foo(mut a) = &mut Foo(0);
3228
| ^^^^^

0 commit comments

Comments
 (0)