test: Add compile-fail test for shadowing in-scope enums
This commit is contained in:
parent
e7409859ce
commit
db7a1f7b0c
1 changed files with 5 additions and 0 deletions
5
src/test/compile-fail/enum-in-scope.rs
Normal file
5
src/test/compile-fail/enum-in-scope.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
enum hello = int;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let hello = 0; //!ERROR declaration of `hello` shadows an enum that's in
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue