]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/access_union_field.thir.stderr
Rollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum
[rust.git] / tests / ui / unsafe / access_union_field.thir.stderr
1 error[E0133]: access to union field is unsafe and requires unsafe function or block
2   --> $DIR/access_union_field.rs:13:13
3    |
4 LL |     let a = foo.bar;
5    |             ^^^^^^^ access to union field
6    |
7    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
8
9 error[E0133]: access to union field is unsafe and requires unsafe function or block
10   --> $DIR/access_union_field.rs:14:13
11    |
12 LL |     let b = foo.baz;
13    |             ^^^^^^^ access to union field
14    |
15    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0133`.