]> git.lizzy.rs Git - rust.git/commitdiff
Fix broken tests for E0428
authortrixnz <me@trix.nz>
Sat, 20 Aug 2016 10:10:41 +0000 (12:10 +0200)
committertrixnz <me@trix.nz>
Sat, 20 Aug 2016 10:10:41 +0000 (12:10 +0200)
src/test/compile-fail/enum-and-module-in-same-scope.rs
src/test/compile-fail/issue-21546.rs
src/test/compile-fail/trait-duplicate-methods.rs

index a6793ee8b9fbda001b64993f792666074de93db0..527ac7505a654b15c068ecd704390adee28932e8 100644 (file)
@@ -8,11 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum Foo { //~ NOTE previous definition
+enum Foo { //~ NOTE previous definition of `Foo` here
     X
 }
 
 mod Foo { //~ ERROR a type named `Foo` has already been defined
+          //~| NOTE already defined
     pub static X: isize = 42;
     fn f() { f() } // Check that this does not result in a resolution error
 }
index 11d05ceb9a019d220e4fab6f23fffe374e779945..d103d45bc4cb75bb4b6ecf714f0ce572e87fdb6d 100644 (file)
@@ -17,6 +17,7 @@ mod Foo { }
 #[allow(dead_code)]
 struct Foo;
 //~^ ERROR a module named `Foo` has already been defined in this module
+//~| NOTE already defined
 
 #[allow(non_snake_case)]
 mod Bar { }
@@ -25,6 +26,7 @@ mod Bar { }
 #[allow(dead_code)]
 struct Bar(i32);
 //~^ ERROR a module named `Bar` has already been defined
+//~| NOTE already defined
 
 
 #[allow(dead_code)]
@@ -34,6 +36,7 @@ mod Bar { }
 #[allow(non_snake_case)]
 mod Baz { }
 //~^ ERROR a type named `Baz` has already been defined
+//~| NOTE already defined
 
 
 #[allow(dead_code)]
@@ -43,6 +46,7 @@ struct Qux { x: bool }
 #[allow(non_snake_case)]
 mod Qux { }
 //~^ ERROR a type named `Qux` has already been defined
+//~| NOTE already defined
 
 
 #[allow(dead_code)]
@@ -52,6 +56,7 @@ mod Qux { }
 #[allow(non_snake_case)]
 mod Quux { }
 //~^ ERROR a type named `Quux` has already been defined
+//~| NOTE already defined
 
 
 #[allow(dead_code)]
@@ -61,5 +66,6 @@ enum Corge { A, B }
 #[allow(non_snake_case)]
 mod Corge { }
 //~^ ERROR a type named `Corge` has already been defined
+//~| NOTE already defined
 
 fn main() { }
index 41700b25bbb726798de48eca9d0544c393220b56..7bcab1f6ac56b9da9e828b45fefc604a6ac67fb3 100644 (file)
@@ -11,6 +11,7 @@
 trait Foo {
     fn orange(&self); //~ NOTE previous definition of `orange` here
     fn orange(&self); //~ ERROR a value named `orange` has already been defined in this trait
+                      //~| NOTE already define
 }
 
 fn main() {}