Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make overlapping_inherent_impls lint a hard error #40728

Merged
merged 1 commit into from
Apr 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
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>",
Expand Down Expand Up @@ -263,4 +259,5 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
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");
}
1 change: 0 additions & 1 deletion src/librustc_typeck/coherence/inherent_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,3 @@ impl<'a, 'tcx> InherentCollect<'a, 'tcx> {
}
}
}

1 change: 1 addition & 0 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4212,4 +4212,5 @@ register_diagnostics! {
// 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 `{}`
}
Original file line number Diff line number Diff line change
Expand Up @@ -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() { }
3 changes: 0 additions & 3 deletions src/test/compile-fail/inherent-overlap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ struct Foo;

impl Foo {
fn id() {} //~ ERROR duplicate definitions
//~^ WARN previously accepted
}

impl Foo {
Expand All @@ -28,7 +27,6 @@ struct Bar<T>(T);

impl<T> Bar<T> {
fn bar(&self) {} //~ ERROR duplicate definitions
//~^ WARN previously accepted
}

impl Bar<u32> {
Expand All @@ -39,7 +37,6 @@ struct Baz<T>(T);

impl<T: Copy> Baz<T> {
fn baz(&self) {} //~ ERROR duplicate definitions
//~^ WARN previously accepted
}

impl<T> Baz<Vec<T>> {
Expand Down