Skip to content

Commit df3e003

Browse files
committed
Don't stub out part of test
1 parent 74d0d74 commit df3e003

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/test/ui/issues/issue-47412.mir.stderr

+1-1
Original file line numberDiff line numberDiff 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

99
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
1111
|
1212
LL | match *ptr {}
1313
| ^^^^ dereference of raw pointer

src/test/ui/issues/issue-47412.rs

+1-2
Original file line numberDiff line numberDiff 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

1918
fn raw_ptr_deref() {
+10-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
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+
19
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
311
|
412
LL | 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

1119
For more information about this error, try `rustc --explain E0133`.

0 commit comments

Comments
 (0)