]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binding/issue-53114-safety-checks.stderr
Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726
[rust.git] / src / test / ui / binding / issue-53114-safety-checks.stderr
1 warning: reference to packed field is unaligned
2   --> $DIR/issue-53114-safety-checks.rs:23:13
3    |
4 LL |     let _ = &p.b;
5    |             ^^^^
6    |
7    = note: `#[warn(unaligned_references)]` on by default
8    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
9    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
10    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
11
12 warning: reference to packed field is unaligned
13   --> $DIR/issue-53114-safety-checks.rs:29:17
14    |
15 LL |     let (_,) = (&p.b,);
16    |                 ^^^^
17    |
18    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
19    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
20    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
21
22 warning: reference to packed field is unaligned
23   --> $DIR/issue-53114-safety-checks.rs:39:11
24    |
25 LL |     match &p.b  { _ => { } }
26    |           ^^^^
27    |
28    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
29    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
30    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
31
32 warning: reference to packed field is unaligned
33   --> $DIR/issue-53114-safety-checks.rs:45:12
34    |
35 LL |     match (&p.b,)  { (_,) => { } }
36    |            ^^^^
37    |
38    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39    = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
40    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
41
42 error[E0133]: access to union field is unsafe and requires unsafe function or block
43   --> $DIR/issue-53114-safety-checks.rs:26:13
44    |
45 LL |     let _ = &u2.a;
46    |             ^^^^^ access to union field
47    |
48    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
49
50 error[E0133]: access to union field is unsafe and requires unsafe function or block
51   --> $DIR/issue-53114-safety-checks.rs:31:17
52    |
53 LL |     let (_,) = (u1.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/issue-53114-safety-checks.rs:32:17
60    |
61 LL |     let (_,) = (&u2.a,);
62    |                 ^^^^^ access to union field
63    |
64    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
65
66 error[E0133]: access to union field is unsafe and requires unsafe function or block
67   --> $DIR/issue-53114-safety-checks.rs:41:11
68    |
69 LL |     match u1.a  { _ => { } }
70    |           ^^^^ access to union field
71    |
72    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
73
74 error[E0133]: access to union field is unsafe and requires unsafe function or block
75   --> $DIR/issue-53114-safety-checks.rs:42:11
76    |
77 LL |     match &u2.a { _ => { } }
78    |           ^^^^^ access to union field
79    |
80    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
81
82 error[E0133]: access to union field is unsafe and requires unsafe function or block
83   --> $DIR/issue-53114-safety-checks.rs:47:12
84    |
85 LL |     match (u1.a,)  { (_,) => { } }
86    |            ^^^^ access to union field
87    |
88    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
89
90 error[E0133]: access to union field is unsafe and requires unsafe function or block
91   --> $DIR/issue-53114-safety-checks.rs:48:12
92    |
93 LL |     match (&u2.a,) { (_,) => { } }
94    |            ^^^^^ access to union field
95    |
96    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
97
98 error: aborting due to 7 previous errors; 4 warnings emitted
99
100 For more information about this error, try `rustc --explain E0133`.