You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/binding/issue-53114-safety-checks.stderr
+11-19
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ LL | let _: _ = &p.b;
26
26
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
27
27
28
28
error[E0793]: reference to packed field is unaligned
29
-
--> $DIR/issue-53114-safety-checks.rs:43:20
29
+
--> $DIR/issue-53114-safety-checks.rs:42:20
30
30
|
31
31
LL | let (_,): _ = (&p.b,);
32
32
| ^^^^
@@ -35,7 +35,7 @@ LL | let (_,): _ = (&p.b,);
35
35
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
36
36
37
37
error[E0793]: reference to packed field is unaligned
38
-
--> $DIR/issue-53114-safety-checks.rs:52:11
38
+
--> $DIR/issue-53114-safety-checks.rs:51:11
39
39
|
40
40
LL | match &p.b { _ => { } }
41
41
| ^^^^
@@ -44,7 +44,7 @@ LL | match &p.b { _ => { } }
44
44
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
45
45
46
46
error[E0793]: reference to packed field is unaligned
47
-
--> $DIR/issue-53114-safety-checks.rs:57:12
47
+
--> $DIR/issue-53114-safety-checks.rs:56:12
48
48
|
49
49
LL | match (&p.b,) { (_,) => { } }
50
50
| ^^^^
@@ -93,70 +93,62 @@ LL | let _: _ = u1.a;
93
93
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
94
94
95
95
error[E0133]: access to union field is unsafe and requires unsafe function or block
96
-
--> $DIR/issue-53114-safety-checks.rs:38:12
97
-
|
98
-
LL | let _: _ = u1.a;
99
-
| ^ access to union field
100
-
|
101
-
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
102
-
103
-
error[E0133]: access to union field is unsafe and requires unsafe function or block
104
-
--> $DIR/issue-53114-safety-checks.rs:40:16
96
+
--> $DIR/issue-53114-safety-checks.rs:39:16
105
97
|
106
98
LL | let _: _ = &u2.a;
107
99
| ^^^^^ access to union field
108
100
|
109
101
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
110
102
111
103
error[E0133]: access to union field is unsafe and requires unsafe function or block
112
-
--> $DIR/issue-53114-safety-checks.rs:44:20
104
+
--> $DIR/issue-53114-safety-checks.rs:43:20
113
105
|
114
106
LL | let (_,): _ = (u1.a,);
115
107
| ^^^^ access to union field
116
108
|
117
109
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
118
110
119
111
error[E0133]: access to union field is unsafe and requires unsafe function or block
120
-
--> $DIR/issue-53114-safety-checks.rs:45:20
112
+
--> $DIR/issue-53114-safety-checks.rs:44:20
121
113
|
122
114
LL | let (_,): _ = (&u2.a,);
123
115
| ^^^^^ access to union field
124
116
|
125
117
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
126
118
127
119
error[E0133]: access to union field is unsafe and requires unsafe function or block
128
-
--> $DIR/issue-53114-safety-checks.rs:53:11
120
+
--> $DIR/issue-53114-safety-checks.rs:52:11
129
121
|
130
122
LL | match u1.a { _ => { } }
131
123
| ^^^^ access to union field
132
124
|
133
125
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
134
126
135
127
error[E0133]: access to union field is unsafe and requires unsafe function or block
136
-
--> $DIR/issue-53114-safety-checks.rs:54:11
128
+
--> $DIR/issue-53114-safety-checks.rs:53:11
137
129
|
138
130
LL | match &u2.a { _ => { } }
139
131
| ^^^^^ access to union field
140
132
|
141
133
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
142
134
143
135
error[E0133]: access to union field is unsafe and requires unsafe function or block
144
-
--> $DIR/issue-53114-safety-checks.rs:58:12
136
+
--> $DIR/issue-53114-safety-checks.rs:57:12
145
137
|
146
138
LL | match (u1.a,) { (_,) => { } }
147
139
| ^^^^ access to union field
148
140
|
149
141
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
150
142
151
143
error[E0133]: access to union field is unsafe and requires unsafe function or block
152
-
--> $DIR/issue-53114-safety-checks.rs:59:12
144
+
--> $DIR/issue-53114-safety-checks.rs:58:12
153
145
|
154
146
LL | match (&u2.a,) { (_,) => { } }
155
147
| ^^^^^ access to union field
156
148
|
157
149
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
158
150
159
-
error: aborting due to 19 previous errors
151
+
error: aborting due to 18 previous errors
160
152
161
153
Some errors have detailed explanations: E0133, E0793.
162
154
For more information about an error, try `rustc --explain E0133`.
0 commit comments