make lint warn by default
This commit is contained in:
parent
363fabaf1f
commit
4b3c66d2c3
4 changed files with 10 additions and 13 deletions
|
@ -262,7 +262,7 @@ declare_lint! {
|
|||
|
||||
declare_lint! {
|
||||
pub COHERENCE_LEAK_CHECK,
|
||||
Deny,
|
||||
Warn,
|
||||
"distinct impls distinguished only by the leak-check code",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #56105 <https://github.com/rust-lang/rust/issues/56105>",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
|
||||
--> $DIR/coherence-subtyping.rs:15:1
|
||||
warning: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
|
||||
--> $DIR/coherence-subtyping.rs:16:1
|
||||
|
|
||||
LL | impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {}
|
||||
| ---------------------------------------------------------- first implementation here
|
||||
|
@ -7,10 +7,8 @@ LL |
|
|||
LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
|
||||
|
|
||||
= note: `#[deny(coherence_leak_check)]` on by default
|
||||
= note: `#[warn(coherence_leak_check)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
|
||||
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
|
||||
--> $DIR/coherence-subtyping.rs:15:1
|
||||
warning: conflicting implementations of trait `TheTrait` for type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`:
|
||||
--> $DIR/coherence-subtyping.rs:16:1
|
||||
|
|
||||
LL | impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {}
|
||||
| ---------------------------------------------------------- first implementation here
|
||||
|
@ -7,10 +7,8 @@ LL |
|
|||
LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8`
|
||||
|
|
||||
= note: `#[deny(coherence_leak_check)]` on by default
|
||||
= note: `#[warn(coherence_leak_check)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #56105 <https://github.com/rust-lang/rust/issues/56105>
|
||||
= note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
// universe transition (#56105) may eventually become an error.
|
||||
|
||||
// revisions: old re
|
||||
// check-pass
|
||||
|
||||
trait TheTrait {
|
||||
fn foo(&self) {}
|
||||
|
@ -13,9 +14,9 @@ trait TheTrait {
|
|||
impl TheTrait for for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {}
|
||||
|
||||
impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 {
|
||||
//[re]~^ ERROR conflicting implementation
|
||||
//[re]~^ WARNING conflicting implementation
|
||||
//[re]~^^ WARNING this was previously accepted by the compiler but is being phased out
|
||||
//[old]~^^^ ERROR conflicting implementation
|
||||
//[old]~^^^ WARNING conflicting implementation
|
||||
//[old]~^^^^ WARNING this was previously accepted by the compiler but is being phased out
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue