Skip to content

Commit 4d8a6ea

Browse files
committed
Fix some misbehaving tests
1 parent 210e234 commit 4d8a6ea

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/test/run-pass/binding/empty-types-in-patterns.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#![feature(slice_patterns)]
1515
#![allow(unreachable_patterns)]
1616
#![allow(unreachable_code)]
17+
#![allow(unused_variables)]
1718

1819
#[allow(dead_code)]
1920
fn foo(z: !) {

src/test/run-pass/issues/issue-41696.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// run-pass
1212
#![allow(dead_code)]
1313
#![allow(unused_variables)]
14+
#![recursion_limit = "128"]
1415
// this used to cause exponential code-size blowup during LLVM passes.
1516

1617
#![feature(test)]

src/test/ui/consts/const-eval/ub-uninhabit.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error[E0080]: it is undefined behavior to use this value
2-
--> $DIR/ub-uninhabit.rs:13:1
2+
--> $DIR/ub-uninhabit.rs:14:1
33
|
44
LL | const BAD_BAD_BAD: Bar = unsafe { (TransmuteUnion::<(), Bar> { a: () }).b };
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type
66
|
77
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
88

99
error[E0080]: it is undefined behavior to use this value
10-
--> $DIR/ub-uninhabit.rs:16:1
10+
--> $DIR/ub-uninhabit.rs:17:1
1111
|
1212
LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at .<deref>
1414
|
1515
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
1616

1717
error[E0080]: it is undefined behavior to use this value
18-
--> $DIR/ub-uninhabit.rs:19:1
18+
--> $DIR/ub-uninhabit.rs:20:1
1919
|
2020
LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { (TransmuteUnion::<(), [Bar; 1]> { a: () }).b };
2121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type

0 commit comments

Comments
 (0)