]> git.lizzy.rs Git - rust.git/commitdiff
Make overlapping_inherent_impls lint a hard error
authortopecongiro <seuchida@gmail.com>
Wed, 22 Mar 2017 07:17:15 +0000 (16:17 +0900)
committertopecongiro <seuchida@gmail.com>
Wed, 29 Mar 2017 04:27:00 +0000 (13:27 +0900)
src/librustc_lint/lib.rs
src/librustc_typeck/coherence/inherent_impls.rs
src/librustc_typeck/diagnostics.rs
src/test/compile-fail/coherence-overlapping-inherent-impl-trait.rs
src/test/compile-fail/inherent-overlap.rs

index 05dbbc09870252abaa963e49025a924c7fe81861..8d759d89135ac90ca505853dce307c241b666c29 100644 (file)
@@ -196,10 +196,6 @@ macro_rules! add_lint_group {
             id: LintId::of(SUPER_OR_SELF_IN_GLOBAL_PATH),
             reference: "issue #36888 <https://github.com/rust-lang/rust/issues/36888>",
         },
-        FutureIncompatibleInfo {
-            id: LintId::of(OVERLAPPING_INHERENT_IMPLS),
-            reference: "issue #36889 <https://github.com/rust-lang/rust/issues/36889>",
-        },
         FutureIncompatibleInfo {
             id: LintId::of(ILLEGAL_FLOATING_POINT_CONSTANT_PATTERN),
             reference: "issue #36890 <https://github.com/rust-lang/rust/issues/36890>",
@@ -263,4 +259,5 @@ macro_rules! add_lint_group {
     store.register_removed("drop_with_repr_extern", "drop flags have been removed");
     store.register_removed("transmute_from_fn_item_types",
         "always cast functions before transmuting them");
+    store.register_removed("overlapping_inherent_impls", "converted into hard error, see #36889");
 }
index 3a39df505eb07863ae2314bff3f2174dd419abe3..dc4bd7733fc211e90a18851cab92c7a1c8b50698 100644 (file)
@@ -322,4 +322,3 @@ fn check_primitive_impl(&self,
         }
     }
 }
-
index bd6129eb5bee3c80befdfa76500988837d72f91e..fb951fd20e564cbd3490f105994b03b10564a92d 100644 (file)
@@ -4212,4 +4212,5 @@ fn main() { }
            // but `{}` was found in the type `{}`
     E0567, // auto traits can not have type parameters
     E0568, // auto-traits can not have predicates,
+    E0592, // duplicate definitions with name `{}`
 }
index 08e8605e91773feab8d2be6b1a8918fe30620787..158d3606104a956de3b9ec0461e9f66a6c8f92ec 100644 (file)
@@ -9,10 +9,8 @@
 // except according to those terms.
 
 #![allow(dead_code)]
-#![deny(overlapping_inherent_impls)]
 
 trait C {}
 impl C { fn f() {} } //~ ERROR duplicate definitions with name `f`
-//~^ WARN: this was previously accepted
 impl C { fn f() {} }
 fn main() { }
index 00d41244639f55f0b42ae92e6d4cc1f3dd5f623c..18e77ddfd2c5b450e48af1c11bf98657c0214da4 100644 (file)
@@ -17,7 +17,6 @@
 
 impl Foo {
     fn id() {} //~ ERROR duplicate definitions
-    //~^ WARN previously accepted
 }
 
 impl Foo {
@@ -28,7 +27,6 @@ fn id() {}
 
 impl<T> Bar<T> {
     fn bar(&self) {} //~ ERROR duplicate definitions
-    //~^ WARN previously accepted
 }
 
 impl Bar<u32> {
@@ -39,7 +37,6 @@ fn bar(&self) {}
 
 impl<T: Copy> Baz<T> {
     fn baz(&self) {} //~ ERROR duplicate definitions
-    //~^ WARN previously accepted
 }
 
 impl<T> Baz<Vec<T>> {