868706d9b5
Anonymous structs or unions are only allowed in struct field definitions. Co-authored-by: carbotaniuman <41451839+carbotaniuman@users.noreply.github.com>
79 lines
2.3 KiB
Plaintext
79 lines
2.3 KiB
Plaintext
error: anonymous unions are not allowed outside of unnamed struct or union fields
|
|
--> $DIR/restrict_anonymous_unions.rs:5:12
|
|
|
|
|
LL | field: union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^ anonymous union declared here
|
|
|
|
error: unnamed fields can only have struct or union types
|
|
--> $DIR/restrict_anonymous_unions.rs:12: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:16:12
|
|
|
|
|
LL | field: union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^ anonymous union declared here
|
|
|
|
error: unnamed fields can only have struct or union types
|
|
--> $DIR/restrict_anonymous_unions.rs:23: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:28: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:28: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:33:9
|
|
|
|
|
LL | _ : u8,
|
|
| -^^^^^
|
|
| |
|
|
| unnamed field declared here
|
|
|
|
error: anonymous unions are unimplemented
|
|
--> $DIR/restrict_anonymous_unions.rs:5:12
|
|
|
|
|
LL | field: union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: anonymous unions are unimplemented
|
|
--> $DIR/restrict_anonymous_unions.rs:7:8
|
|
|
|
|
LL | _: union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: anonymous unions are unimplemented
|
|
--> $DIR/restrict_anonymous_unions.rs:16:12
|
|
|
|
|
LL | field: union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: anonymous unions are unimplemented
|
|
--> $DIR/restrict_anonymous_unions.rs:18:8
|
|
|
|
|
LL | _: union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: anonymous unions are unimplemented
|
|
--> $DIR/restrict_anonymous_unions.rs:28:13
|
|
|
|
|
LL | _ : union { field: u8 },
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 12 previous errors
|
|
|