|
1 | 1 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
2 | | - --> $DIR/union-unsafe.rs:31:6 |
| 2 | + --> $DIR/union-unsafe.rs:35:6 |
3 | 3 | | |
4 | 4 | LL | *(u.p) = 13; |
5 | 5 | | ^^^^^ access to union field |
6 | 6 | | |
7 | 7 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
8 | 8 |
|
9 | 9 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
10 | | - --> $DIR/union-unsafe.rs:43:6 |
| 10 | + --> $DIR/union-unsafe.rs:39:26 |
| 11 | + | |
| 12 | +LL | let _p = &raw const *(u.p); |
| 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[E0133]: access to union field is unsafe and requires unsafe function or block |
| 18 | + --> $DIR/union-unsafe.rs:39:26 |
| 19 | + | |
| 20 | +LL | let _p = &raw const *(u.p); |
| 21 | + | ^^^^^ access to union field |
| 22 | + | |
| 23 | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
| 24 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 25 | + |
| 26 | +error[E0133]: access to union field is unsafe and requires unsafe function or block |
| 27 | + --> $DIR/union-unsafe.rs:53:6 |
11 | 28 | | |
12 | 29 | LL | *u3.a = T::default(); |
13 | 30 | | ^^^^ access to union field |
14 | 31 | | |
15 | 32 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
16 | 33 |
|
17 | 34 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
18 | | - --> $DIR/union-unsafe.rs:49:6 |
| 35 | + --> $DIR/union-unsafe.rs:59:6 |
19 | 36 | | |
20 | 37 | LL | *u3.a = T::default(); |
21 | 38 | | ^^^^ access to union field |
22 | 39 | | |
23 | 40 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
24 | 41 |
|
25 | 42 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
26 | | - --> $DIR/union-unsafe.rs:57:13 |
| 43 | + --> $DIR/union-unsafe.rs:67:13 |
27 | 44 | | |
28 | 45 | LL | let a = u1.a; |
29 | 46 | | ^^^^ access to union field |
30 | 47 | | |
31 | 48 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
32 | 49 |
|
33 | 50 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
34 | | - --> $DIR/union-unsafe.rs:68:14 |
| 51 | + --> $DIR/union-unsafe.rs:80:29 |
| 52 | + | |
| 53 | +LL | let _a = &raw const vec[u4.a]; |
| 54 | + | ^^^^ access to union field |
| 55 | + | |
| 56 | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
| 57 | + |
| 58 | +error[E0133]: access to union field is unsafe and requires unsafe function or block |
| 59 | + --> $DIR/union-unsafe.rs:80:29 |
| 60 | + | |
| 61 | +LL | let _a = &raw const vec[u4.a]; |
| 62 | + | ^^^^ access to union field |
| 63 | + | |
| 64 | + = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
| 65 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 66 | + |
| 67 | +error[E0133]: access to union field is unsafe and requires unsafe function or block |
| 68 | + --> $DIR/union-unsafe.rs:83:14 |
35 | 69 | | |
36 | 70 | LL | let U1 { a } = u1; |
37 | 71 | | ^ access to union field |
38 | 72 | | |
39 | 73 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
40 | 74 |
|
41 | 75 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
42 | | - --> $DIR/union-unsafe.rs:69:20 |
| 76 | + --> $DIR/union-unsafe.rs:84:20 |
43 | 77 | | |
44 | 78 | LL | if let U1 { a: 12 } = u1 {} |
45 | 79 | | ^^ access to union field |
46 | 80 | | |
47 | 81 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
48 | 82 |
|
49 | 83 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
50 | | - --> $DIR/union-unsafe.rs:70:25 |
| 84 | + --> $DIR/union-unsafe.rs:85:25 |
51 | 85 | | |
52 | 86 | LL | if let Some(U1 { a: 13 }) = Some(u1) {} |
53 | 87 | | ^^ access to union field |
54 | 88 | | |
55 | 89 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
56 | 90 |
|
57 | 91 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
58 | | - --> $DIR/union-unsafe.rs:75:6 |
| 92 | + --> $DIR/union-unsafe.rs:90:6 |
59 | 93 | | |
60 | 94 | LL | *u2.a = String::from("new"); |
61 | 95 | | ^^^^ access to union field |
62 | 96 | | |
63 | 97 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
64 | 98 |
|
65 | 99 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
66 | | - --> $DIR/union-unsafe.rs:79:6 |
| 100 | + --> $DIR/union-unsafe.rs:94:6 |
67 | 101 | | |
68 | 102 | LL | *u3.a = 1; |
69 | 103 | | ^^^^ access to union field |
70 | 104 | | |
71 | 105 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
72 | 106 |
|
73 | 107 | error[E0133]: access to union field is unsafe and requires unsafe function or block |
74 | | - --> $DIR/union-unsafe.rs:83:6 |
| 108 | + --> $DIR/union-unsafe.rs:98:6 |
75 | 109 | | |
76 | 110 | LL | *u3.a = String::from("new"); |
77 | 111 | | ^^^^ access to union field |
78 | 112 | | |
79 | 113 | = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior |
80 | 114 |
|
81 | | -error: aborting due to 10 previous errors |
| 115 | +error: aborting due to 14 previous errors |
82 | 116 |
|
83 | 117 | For more information about this error, try `rustc --explain E0133`. |
0 commit comments