blob: efcf544fde4dcc5662b20e51b91cf84c19ffc0cd [file] [log] [blame]
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:4:11
|
LL | fn f() -> struct { field: u8 } {}
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:7:10
|
LL | fn f2(a: struct { field: u8 } ) {}
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:11:12
|
LL | field: struct { field: u8 }
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:18:10
|
LL | struct I(struct { field: u8 }, u8);
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:22:7
|
LL | K(struct { field: u8 }),
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous fields are not allowed outside of structs or unions
--> $DIR/restrict_anonymous.rs:25:9
|
LL | _ : struct { field: u8 }
| -^^^^^^^^^^^^^^^^^^^^^^^
| |
| anonymous field declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:25:13
|
LL | _ : struct { field: u8 }
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous fields are not allowed outside of structs or unions
--> $DIR/restrict_anonymous.rs:30:9
|
LL | _ : u8
| -^^^^^
| |
| anonymous field declared here
error: anonymous unions are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:34:11
|
LL | static M: union { field: u8 } = 0;
| ^^^^^^^^^^^^^^^^^^^ anonymous union declared here
error: anonymous unions are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:37:10
|
LL | type N = union { field: u8 };
| ^^^^^^^^^^^^^^^^^^^ anonymous union declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:41:14
|
LL | const O: struct { field: u8 } = 0;
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:44:13
|
LL | let p: [struct { field: u8 }; 1];
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:47:13
|
LL | let q: (struct { field: u8 }, u8);
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are not allowed outside of unnamed struct or union fields
--> $DIR/restrict_anonymous.rs:50:20
|
LL | let cl = || -> struct { field: u8 } {};
| ^^^^^^^^^^^^^^^^^^^^ anonymous struct declared here
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:4:11
|
LL | fn f() -> struct { field: u8 } {}
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:7:10
|
LL | fn f2(a: struct { field: u8 } ) {}
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:11:12
|
LL | field: struct { field: u8 }
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:18:10
|
LL | struct I(struct { field: u8 }, u8);
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:22:7
|
LL | K(struct { field: u8 }),
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:25:13
|
LL | _ : struct { field: u8 }
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous unions are unimplemented
--> $DIR/restrict_anonymous.rs:34:11
|
LL | static M: union { field: u8 } = 0;
| ^^^^^^^^^^^^^^^^^^^
error: anonymous unions are unimplemented
--> $DIR/restrict_anonymous.rs:37:10
|
LL | type N = union { field: u8 };
| ^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:44:13
|
LL | let p: [struct { field: u8 }; 1];
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:47:13
|
LL | let q: (struct { field: u8 }, u8);
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:50:20
|
LL | let cl = || -> struct { field: u8 } {};
| ^^^^^^^^^^^^^^^^^^^^
error: anonymous structs are unimplemented
--> $DIR/restrict_anonymous.rs:41:14
|
LL | const O: struct { field: u8 } = 0;
| ^^^^^^^^^^^^^^^^^^^^
error[E0740]: unions may not contain fields that need dropping
--> $DIR/restrict_anonymous.rs:11:5
|
LL | field: struct { field: u8 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: `std::mem::ManuallyDrop` can be used to wrap the type
--> $DIR/restrict_anonymous.rs:11:5
|
LL | field: struct { field: u8 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 27 previous errors
For more information about this error, try `rustc --explain E0740`.