Skip to content

Commit e2a96c7

Browse files
committed
Change leak check lint message to behavior is likely to change in the future
1 parent ee9c7c9 commit e2a96c7

13 files changed

+18
-20
lines changed

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ declare_lint! {
15031503
Warn,
15041504
"distinct impls distinguished only by the leak-check code",
15051505
@future_incompatible = FutureIncompatibleInfo {
1506-
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
1506+
reason: FutureIncompatibilityReason::Custom("the behavior may change in a future release"),
15071507
reference: "issue #56105 <https://github.com/rust-lang/rust/issues/56105>",
15081508
};
15091509
}

tests/ui/coherence/coherence-fn-implied-bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl Trait for for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32 {}
2020

2121
impl Trait for for<'c> fn(&'c &'c u32, &'c &'c u32) -> &'c u32 {
2222
//~^ ERROR conflicting implementations
23-
//~| WARNING this was previously accepted by the compiler
23+
//~| WARN the behavior may change in a future release
2424
}
2525

2626
fn main() {}

tests/ui/coherence/coherence-fn-implied-bounds.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL |
77
LL | impl Trait for for<'c> fn(&'c &'c u32, &'c &'c u32) -> &'c u32 {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a &'b u32, &'b &'a u32) -> &'b u32`
99
|
10-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
10+
= warning: the behavior may change in a future release
1111
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
1212
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
1313
note: the lint level is defined here

tests/ui/coherence/coherence-free-vs-bound-region.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl<'a> TheTrait for fn(&'a u8) {}
1515

1616
impl TheTrait for fn(&u8) {
1717
//~^ ERROR conflicting implementations of trait
18-
//~| WARNING this was previously accepted by the compiler
18+
//~| WARN the behavior may change in a future release
1919
}
2020

2121
fn main() {}

tests/ui/coherence/coherence-free-vs-bound-region.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL |
77
LL | impl TheTrait for fn(&u8) {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(&u8)`
99
|
10-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
10+
= warning: the behavior may change in a future release
1111
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
1212
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
1313
note: the lint level is defined here

tests/ui/coherence/coherence-subtyping.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ trait TheTrait {
1313
impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {}
1414

1515
impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
16-
//~^ WARNING conflicting implementation
17-
//~^^ WARNING this was previously accepted by the compiler but is being phased out
16+
//~^ WARN conflicting implementation
17+
//~| WARN the behavior may change in a future release
1818
}
1919

2020
fn main() {}

tests/ui/coherence/coherence-subtyping.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL |
77
LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
88
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
99
|
10-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
10+
= warning: the behavior may change in a future release
1111
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
1212
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
1313
= note: `#[warn(coherence_leak_check)]` on by default

tests/ui/coherence/coherence-wasm-bindgen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ where
3131
R: ReturnWasmAbi,
3232
{
3333
//~^^^^^ ERROR conflicting implementation
34-
//~| WARNING this was previously accepted
34+
//~| WARN the behavior may change in a future release
3535
}
3636

3737
fn main() {}

tests/ui/coherence/coherence-wasm-bindgen.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | | A: RefFromWasmAbi,
1313
LL | | R: ReturnWasmAbi,
1414
| |_____________________^ conflicting implementation for `&dyn Fn(&_) -> _`
1515
|
16-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
16+
= warning: the behavior may change in a future release
1717
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
1818
= note: downstream crates may implement trait `FromWasmAbi` for type `&_`
1919
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details

tests/ui/coherence/negative-coherence-placeholder-region-constraints-on-unification.explicit.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | impl<T: ?Sized + Marker> FnMarker for fn(T) {}
66
LL | impl<T: ?Sized> FnMarker for fn(&T) {}
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `fn(&_)`
88
|
9-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9+
= warning: the behavior may change in a future release
1010
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
1111
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
1212
note: the lint level is defined here

0 commit comments

Comments
 (0)