Temporarily remove future compatibility label from migration lint
The lint is unstable, and the lint group `rust_2024_compatibility` must keep working on stable
This commit is contained in:
parent
83f330fbd4
commit
d5d700d5c6
3 changed files with 5 additions and 10 deletions
|
@ -1657,10 +1657,11 @@ declare_lint! {
|
||||||
Allow,
|
Allow,
|
||||||
"detects `mut x` bindings that change the type of `x`",
|
"detects `mut x` bindings that change the type of `x`",
|
||||||
@feature_gate = sym::mut_dont_reset_binding_mode_2024;
|
@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),
|
reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024),
|
||||||
reference: "123076",
|
reference: "123076",
|
||||||
};
|
};*/
|
||||||
}
|
}
|
||||||
|
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
|
|
|
@ -8,11 +8,9 @@ struct Foo(u8);
|
||||||
fn main() {
|
fn main() {
|
||||||
let Foo(mut a) = &Foo(0);
|
let Foo(mut a) = &Foo(0);
|
||||||
//~^ ERROR: dereferencing `mut` binding
|
//~^ ERROR: dereferencing `mut` binding
|
||||||
//~| WARN: this changes meaning in Rust 2024
|
|
||||||
a = 42;
|
a = 42;
|
||||||
|
|
||||||
let Foo(mut a) = &mut Foo(0);
|
let Foo(mut a) = &mut Foo(0);
|
||||||
//~^ ERROR: dereferencing `mut` binding
|
//~^ ERROR: dereferencing `mut` binding
|
||||||
//~| WARN: this changes meaning in Rust 2024
|
|
||||||
a = 42;
|
a = 42;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,6 @@ error: dereferencing `mut` binding
|
||||||
LL | let Foo(mut a) = &Foo(0);
|
LL | let Foo(mut a) = &Foo(0);
|
||||||
| ^^^^^ `mut` dereferences the type of this binding
|
| ^^^^^ `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
|
help: this will change in edition 2024
|
||||||
--> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:9:13
|
--> $DIR/mut_dont_reset_binding_mode_2024_lint.rs:9:13
|
||||||
|
|
|
|
||||||
|
@ -18,15 +16,13 @@ LL | #![forbid(dereferencing_mut_binding)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: 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);
|
LL | let Foo(mut a) = &mut Foo(0);
|
||||||
| ^^^^^ `mut` dereferences the type of this binding
|
| ^^^^^ `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
|
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);
|
LL | let Foo(mut a) = &mut Foo(0);
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
Loading…
Add table
Reference in a new issue