diff options
Diffstat (limited to 'tests/ui/enum/nested-enum.rs')
-rw-r--r-- | tests/ui/enum/nested-enum.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/enum/nested-enum.rs b/tests/ui/enum/nested-enum.rs new file mode 100644 index 000000000..80957b8a1 --- /dev/null +++ b/tests/ui/enum/nested-enum.rs @@ -0,0 +1,8 @@ +enum Foo { + enum Bar { Baz }, //~ ERROR `enum` definition cannot be nested inside `enum` + struct Quux { field: u8 }, //~ ERROR `struct` definition cannot be nested inside `enum` + union Wibble { field: u8 }, //~ ERROR `union` definition cannot be nested inside `enum` + Bat, +} + +fn main() { } |