diff options
| author | Aaron Turon <aturon@mozilla.com> | 2016-03-17 09:05:24 -0700 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2016-03-18 09:48:30 -0700 |
| commit | e477703bbfa47bb03eb0f983164fea4ecaf73cf7 (patch) | |
| tree | 0e09298e298b6da0a00e3f9024fbc4f64161e43e /src/test | |
| parent | abb1515c53d209be3e8c1e9e73c1a98bc86b8692 (diff) | |
| download | rust-e477703bbfa47bb03eb0f983164fea4ecaf73cf7.tar.gz rust-e477703bbfa47bb03eb0f983164fea4ecaf73cf7.zip | |
Change inherent overlap error to a warning for now, to ease the breakage.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/inherent-overlap.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/test/compile-fail/inherent-overlap.rs b/src/test/compile-fail/inherent-overlap.rs index 5b014dbfd22..333a4ee04b2 100644 --- a/src/test/compile-fail/inherent-overlap.rs +++ b/src/test/compile-fail/inherent-overlap.rs @@ -11,10 +11,14 @@ // Test that you cannot define items with the same name in overlapping inherent // impl blocks. +#![feature(rustc_attrs)] +#![allow(dead_code)] + struct Foo; impl Foo { - fn id() {} //~ ERROR E0201 + fn id() {} //~ WARN duplicate definitions + //~^ WARN previously accepted } impl Foo { @@ -24,7 +28,8 @@ impl Foo { struct Bar<T>(T); impl<T> Bar<T> { - fn bar(&self) {} //~ ERROR E0201 + fn bar(&self) {} //~ WARN duplicate definitions + //~^ WARN previously accepted } impl Bar<u32> { @@ -34,11 +39,13 @@ impl Bar<u32> { struct Baz<T>(T); impl<T: Copy> Baz<T> { - fn baz(&self) {} //~ ERROR E0201 + fn baz(&self) {} //~ WARN duplicate definitions + //~^ WARN previously accepted } impl<T> Baz<Vec<T>> { fn baz(&self) {} } -fn main() {} +#[rustc_error] +fn main() {} //~ ERROR compilation successful |
