Skip to content

Commit d5d700d

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 83f330f commit d5d700d

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+3-2
Original file line numberDiff line numberDiff 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

16661667
declare_lint! {

tests/ui/pattern/mut_dont_reset_binding_mode_2024_lint.rs

-2
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

+2-6
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)