about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2020-02-06 15:59:09 -0500
committerNiko Matsakis <niko@alum.mit.edu>2020-02-06 16:29:32 -0500
commit4b3c66d2c309a16d48c2b7f992a2038016a098d3 (patch)
tree4535626b6d3f49ebb7e0d8a0d46419b4798da8c9
parent363fabaf1fbd0f38a7ddde4a64866d8cd2cd49f2 (diff)
downloadrust-4b3c66d2c309a16d48c2b7f992a2038016a098d3.tar.gz
rust-4b3c66d2c309a16d48c2b7f992a2038016a098d3.zip
make lint warn by default
-rw-r--r--src/librustc_session/lint/builtin.rs2
-rw-r--r--src/test/ui/coherence/coherence-subtyping.old.stderr8
-rw-r--r--src/test/ui/coherence/coherence-subtyping.re.stderr8
-rw-r--r--src/test/ui/coherence/coherence-subtyping.rs5
4 files changed, 10 insertions, 13 deletions
diff --git a/src/librustc_session/lint/builtin.rs b/src/librustc_session/lint/builtin.rs
index cd972bdb993..0038deda91b 100644
--- a/src/librustc_session/lint/builtin.rs
+++ b/src/librustc_session/lint/builtin.rs
@@ -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>",
diff --git a/src/test/ui/coherence/coherence-subtyping.old.stderr b/src/test/ui/coherence/coherence-subtyping.old.stderr
index 6bae152bd2a..76f5cc1b782 100644
--- a/src/test/ui/coherence/coherence-subtyping.old.stderr
+++ b/src/test/ui/coherence/coherence-subtyping.old.stderr
@@ -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
-
diff --git a/src/test/ui/coherence/coherence-subtyping.re.stderr b/src/test/ui/coherence/coherence-subtyping.re.stderr
index 6bae152bd2a..76f5cc1b782 100644
--- a/src/test/ui/coherence/coherence-subtyping.re.stderr
+++ b/src/test/ui/coherence/coherence-subtyping.re.stderr
@@ -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
-
diff --git a/src/test/ui/coherence/coherence-subtyping.rs b/src/test/ui/coherence/coherence-subtyping.rs
index 9f45290c65b..f5c1d92411b 100644
--- a/src/test/ui/coherence/coherence-subtyping.rs
+++ b/src/test/ui/coherence/coherence-subtyping.rs
@@ -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
 }