diff --git a/tests/compile-fail/zst2.rs b/tests/compile-fail/zst2.rs index 1bf42062de6..dd826c2fd74 100644 --- a/tests/compile-fail/zst2.rs +++ b/tests/compile-fail/zst2.rs @@ -5,7 +5,5 @@ struct A; fn main() { // can't use assert_eq, b/c that will try to print the pointer addresses with full MIR enabled - if &A as *const A as *const () != &() as *const _ { - panic!() - } + assert!(&A as *const A as *const () == &() as *const _) } diff --git a/tests/compile-fail/zst3.rs b/tests/compile-fail/zst3.rs index 55cdd661d3d..53c42995b8a 100644 --- a/tests/compile-fail/zst3.rs +++ b/tests/compile-fail/zst3.rs @@ -5,7 +5,5 @@ struct A; fn main() { // can't use assert_eq, b/c that will try to print the pointer addresses with full MIR enabled - if &A as *const A != &A as *const A { - panic!(); - } + assert!(&A as *const A == &A as *const A); }