File tree 3 files changed +12
-5
lines changed
3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ LL | match u.void {}
7
7
= note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
8
8
9
9
error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
10
- --> $DIR/issue-47412.rs:21 :11
10
+ --> $DIR/issue-47412.rs:20 :11
11
11
|
12
12
LL | match *ptr {}
13
13
| ^^^^ dereference of raw pointer
Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ fn union_field() {
12
12
union Union { unit : ( ) , void : Void }
13
13
let u = Union { unit : ( ) } ;
14
14
match u. void { }
15
- //[mir]~^ ERROR access to union field is unsafe
16
- // FIXME(thir-unsafeck): AccessToUnionField unimplemented
15
+ //~^ ERROR access to union field is unsafe
17
16
}
18
17
19
18
fn raw_ptr_deref ( ) {
Original file line number Diff line number Diff line change
1
+ error[E0133]: access to union field is unsafe and requires unsafe function or block
2
+ --> $DIR/issue-47412.rs:14:11
3
+ |
4
+ LL | match u.void {}
5
+ | ^^^^^^ access to union field
6
+ |
7
+ = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
8
+
1
9
error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
2
- --> $DIR/issue-47412.rs:21 :11
10
+ --> $DIR/issue-47412.rs:20 :11
3
11
|
4
12
LL | match *ptr {}
5
13
| ^^^^ dereference of raw pointer
6
14
|
7
15
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
8
16
9
- error: aborting due to previous error
17
+ error: aborting due to 2 previous errors
10
18
11
19
For more information about this error, try `rustc --explain E0133`.
You can’t perform that action at this time.
0 commit comments