Skip to content

Commit 377fcce

Browse files
committed
Ensure tests run with and without full MIR
1 parent eca9e34 commit 377fcce

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/compile-fail/zst2.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
struct A;
55

66
fn main() {
7-
assert_eq!(&A as *const A as *const (), &() as *const _);
7+
// can't use assert_eq, b/c that will try to print the pointer addresses with full MIR enabled
8+
if &A as *const A as *const () != &() as *const _ {
9+
panic!()
10+
}
811
}

tests/compile-fail/zst3.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
struct A;
55

66
fn main() {
7-
assert_eq!(&A as *const A, &A as *const A);
7+
// can't use assert_eq, b/c that will try to print the pointer addresses with full MIR enabled
8+
if &A as *const A != &A as *const A {
9+
panic!();
10+
}
811
}

0 commit comments

Comments
 (0)