fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB51 linesraw
1error[E0133]: access to union field is unsafe and requires unsafe function or block
2  --> $DIR/union-assignop.rs:19:5
3   |
4LL |     foo.a += 5;
5   |     ^^^^^ access to union field
6   |
7   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
8
9error[E0133]: access to union field is unsafe and requires unsafe function or block
10  --> $DIR/union-assignop.rs:20:6
11   |
12LL |     *foo.b += NonCopy;
13   |      ^^^^^ access to union field
14   |
15   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
16
17error[E0133]: access to union field is unsafe and requires unsafe function or block
18  --> $DIR/union-assignop.rs:21:6
19   |
20LL |     *foo.b = NonCopy;
21   |      ^^^^^ access to union field
22   |
23   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
24
25error[E0133]: access to union field is unsafe and requires unsafe function or block
26  --> $DIR/union-assignop.rs:23:5
27   |
28LL |     foo.a;
29   |     ^^^^^ access to union field
30   |
31   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
32
33error[E0133]: access to union field is unsafe and requires unsafe function or block
34  --> $DIR/union-assignop.rs:25:5
35   |
36LL |     foo.b;
37   |     ^^^^^ access to union field
38   |
39   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
40
41error[E0133]: access to union field is unsafe and requires unsafe function or block
42  --> $DIR/union-assignop.rs:27:13
43   |
44LL |     foo.b = foo.b;
45   |             ^^^^^ access to union field
46   |
47   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
48
49error: aborting due to 6 previous errors
50
51For more information about this error, try `rustc --explain E0133`.