about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2016-03-17 09:05:24 -0700
committerAaron Turon <aturon@mozilla.com>2016-03-18 09:48:30 -0700
commite477703bbfa47bb03eb0f983164fea4ecaf73cf7 (patch)
tree0e09298e298b6da0a00e3f9024fbc4f64161e43e /src/test
parentabb1515c53d209be3e8c1e9e73c1a98bc86b8692 (diff)
downloadrust-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.rs15
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