Skip to content

Commit 86e2367

Browse files
authored
Merge pull request rust-lang#215 from oli-obk/master
Make zst compile-fail tests more readable
2 parents 8c6c6d7 + 4aca1d0 commit 86e2367

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

tests/compile-fail/zst2.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ struct A;
55

66
fn main() {
77
// 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-
}
8+
assert!(&A as *const A as *const () == &() as *const _)
119
}

tests/compile-fail/zst3.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ struct A;
55

66
fn main() {
77
// 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-
}
8+
assert!(&A as *const A == &A as *const A);
119
}

0 commit comments

Comments
 (0)