mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
error: anonymous unions are not allowed outside of unnamed struct or union fields
|
|
--> $DIR/restrict_anonymous_unions.rs:5:13
|
|
|
|
|
LL | field1: union { field2: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^^ anonymous union declared here
|
|
|
|
error: unnamed fields can only have struct or union types
|
|
--> $DIR/restrict_anonymous_unions.rs:10:5
|
|
|
|
|
LL | _: (u8, u8),
|
|
| ^ -------- not a struct or union
|
|
|
|
error: anonymous unions are not allowed outside of unnamed struct or union fields
|
|
--> $DIR/restrict_anonymous_unions.rs:14:13
|
|
|
|
|
LL | field1: union { field2: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^^ anonymous union declared here
|
|
|
|
error: unnamed fields can only have struct or union types
|
|
--> $DIR/restrict_anonymous_unions.rs:19:5
|
|
|
|
|
LL | _: (u8, u8),
|
|
| ^ -------- not a struct or union
|
|
|
|
error: unnamed fields are not allowed outside of structs or unions
|
|
--> $DIR/restrict_anonymous_unions.rs:24:9
|
|
|
|
|
LL | _ : union { field: u8 },
|
|
| -^^^^^^^^^^^^^^^^^^^^^^
|
|
| |
|
|
| unnamed field declared here
|
|
|
|
error: anonymous unions are not allowed outside of unnamed struct or union fields
|
|
--> $DIR/restrict_anonymous_unions.rs:24:13
|
|
|
|
|
LL | _ : union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^ anonymous union declared here
|
|
|
|
error: unnamed fields are not allowed outside of structs or unions
|
|
--> $DIR/restrict_anonymous_unions.rs:28:9
|
|
|
|
|
LL | _ : u8,
|
|
| -^^^^^
|
|
| |
|
|
| unnamed field declared here
|
|
|
|
error: aborting due to 7 previous errors
|
|
|