rust/tests/compile-fail/zst3.rs

10 lines
238 B
Rust
Raw Normal View History

2017-06-23 05:55:49 -05:00
// error-pattern: the evaluated program panicked
#[derive(Debug)]
struct A;
fn main() {
// can't use assert_eq, b/c that will try to print the pointer addresses with full MIR enabled
assert!(&A as *const A == &A as *const A);
2017-06-23 05:55:49 -05:00
}