2021-08-03 19:11:04 +00:00
|
|
|
error[E0133]: access to union field is unsafe and requires unsafe function or block
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-assignop.rs:16:5
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
|
LL | foo.a += 5;
|
2023-12-07 11:56:48 +00:00
|
|
|
| ^^^^^ access to union field
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
|
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
|
|
|
|
|
|
|
|
error[E0133]: access to union field is unsafe and requires unsafe function or block
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-assignop.rs:17:6
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
LL | *foo.b += NonCopy;
|
|
|
|
| ^^^^^ access to union field
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
|
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
|
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
error[E0133]: access to union field is unsafe and requires unsafe function or block
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-assignop.rs:18:6
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
LL | *foo.b = NonCopy;
|
|
|
|
| ^^^^^ access to union field
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
error[E0133]: access to union field is unsafe and requires unsafe function or block
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-assignop.rs:20:5
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
|
LL | foo.a;
|
|
|
|
| ^^^^^ access to union field
|
|
|
|
|
|
|
|
|
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
|
|
|
|
|
|
|
|
error[E0133]: access to union field is unsafe and requires unsafe function or block
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-assignop.rs:22:5
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
|
LL | foo.b;
|
|
|
|
| ^^^^^ access to union field
|
|
|
|
|
|
|
|
|
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
|
|
|
|
|
|
|
|
error[E0133]: access to union field is unsafe and requires unsafe function or block
|
2023-10-26 16:13:20 +00:00
|
|
|
--> $DIR/union-assignop.rs:24:13
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
|
LL | foo.b = foo.b;
|
|
|
|
| ^^^^^ access to union field
|
|
|
|
|
|
|
|
|
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
|
|
|
|
|
2022-06-30 02:33:18 +00:00
|
|
|
error: aborting due to 6 previous errors
|
2021-08-03 19:11:04 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0133`.
|