diff options
Diffstat (limited to 'src/test/compile-fail/enum-and-module-in-same-scope.rs')
| -rw-r--r-- | src/test/compile-fail/enum-and-module-in-same-scope.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/compile-fail/enum-and-module-in-same-scope.rs b/src/test/compile-fail/enum-and-module-in-same-scope.rs index 527ac7505a6..59b4d715c2d 100644 --- a/src/test/compile-fail/enum-and-module-in-same-scope.rs +++ b/src/test/compile-fail/enum-and-module-in-same-scope.rs @@ -8,12 +8,13 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -enum Foo { //~ NOTE previous definition of `Foo` here +enum Foo { //~ NOTE previous definition of the type `Foo` here X } -mod Foo { //~ ERROR a type named `Foo` has already been defined - //~| NOTE already defined +mod Foo { //~ ERROR the name `Foo` is defined multiple times + //~| NOTE `Foo` redefined here + //~| NOTE `Foo` must be defined only once in the type namespace of this module pub static X: isize = 42; fn f() { f() } // Check that this does not result in a resolution error } |
