Skip to content

Commit

Permalink
Fix some misbehaving tests
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Dec 11, 2018
1 parent 210e234 commit 4d8a6ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/test/run-pass/binding/empty-types-in-patterns.rs
Expand Up @@ -14,6 +14,7 @@
#![feature(slice_patterns)]
#![allow(unreachable_patterns)]
#![allow(unreachable_code)]
#![allow(unused_variables)]

#[allow(dead_code)]
fn foo(z: !) {
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/issues/issue-41696.rs
Expand Up @@ -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)]
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/consts/const-eval/ub-uninhabit.stderr
@@ -1,21 +1,21 @@
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
|
= 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>
|
= 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
Expand Down

0 comments on commit 4d8a6ea

Please sign in to comment.