1
Fork 0

Don't ICE on anonymous struct in enum variant

This commit is contained in:
clubby789 2024-02-22 17:22:40 +00:00
parent 1bb3a9f67a
commit 35a9e73521
4 changed files with 41 additions and 1 deletions

View file

@ -0,0 +1,11 @@
#![crate_type = "lib"]
#![feature(unnamed_fields)]
#![allow(unused, incomplete_features)]
enum K {
M {
_ : struct { field: u8 },
//~^ error: unnamed fields are not allowed outside of structs or unions
//~| error: anonymous structs are not allowed outside of unnamed struct or union fields
}
}