This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Expand file tree Collapse file tree 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 {}
77 = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
88
99error[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
1111 |
1212LL | match *ptr {}
1313 | ^^^^ dereference of raw pointer
Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ fn union_field() {
1212 union Union { unit : ( ) , void : Void }
1313 let u = Union { unit : ( ) } ;
1414 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
1716}
1817
1918fn 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+
19error[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
311 |
412LL | match *ptr {}
513 | ^^^^ dereference of raw pointer
614 |
715 = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
816
9- error: aborting due to previous error
17+ error: aborting due to 2 previous errors
1018
1119For more information about this error, try `rustc --explain E0133`.
You can’t perform that action at this time.
0 commit comments