af6a6a3c2c
Anonymous structs or unions are only allowed in struct field definitions. Co-authored-by: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com>
20 lines
273 B
Rust
20 lines
273 B
Rust
// Test for issue 85480
|
|
// Pretty print anonymous struct and union types
|
|
|
|
// pp-exact
|
|
// pretty-compare-only
|
|
|
|
struct Foo {
|
|
_: union {
|
|
_: struct {
|
|
a: u8,
|
|
b: u16,
|
|
},
|
|
c: u32,
|
|
},
|
|
d: u64,
|
|
e: f32,
|
|
}
|
|
|
|
fn main() {}
|