Fix some misbehaving tests
This commit is contained in:
parent
210e234733
commit
4d8a6eac39
3 changed files with 5 additions and 3 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#![feature(slice_patterns)]
|
||||
#![allow(unreachable_patterns)]
|
||||
#![allow(unreachable_code)]
|
||||
#![allow(unused_variables)]
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn foo(z: !) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
// run-pass
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
#![recursion_limit = "128"]
|
||||
// this used to cause exponential code-size blowup during LLVM passes.
|
||||
|
||||
#![feature(test)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0080]: it is undefined behavior to use this value
|
||||
--> $DIR/ub-uninhabit.rs:13:1
|
||||
--> $DIR/ub-uninhabit.rs:14:1
|
||||
|
|
||||
LL | const BAD_BAD_BAD: Bar = unsafe { (TransmuteUnion::<(), Bar> { a: () }).b };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type
|
||||
|
|
@ -7,7 +7,7 @@ LL | const BAD_BAD_BAD: Bar = unsafe { (TransmuteUnion::<(), Bar> { a: () }).b }
|
|||
= 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
|
||||
|
||||
error[E0080]: it is undefined behavior to use this value
|
||||
--> $DIR/ub-uninhabit.rs:16:1
|
||||
--> $DIR/ub-uninhabit.rs:17:1
|
||||
|
|
||||
LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type at .<deref>
|
||||
|
|
@ -15,7 +15,7 @@ LL | const BAD_BAD_REF: &Bar = unsafe { mem::transmute(1usize) };
|
|||
= 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
|
||||
|
||||
error[E0080]: it is undefined behavior to use this value
|
||||
--> $DIR/ub-uninhabit.rs:19:1
|
||||
--> $DIR/ub-uninhabit.rs:20:1
|
||||
|
|
||||
LL | const BAD_BAD_ARRAY: [Bar; 1] = unsafe { (TransmuteUnion::<(), [Bar; 1]> { a: () }).b };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a value of an uninhabited type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue