rust/tests/compile-fail/zst2.rs
2017-09-13 15:46:53 +02:00

10 lines
251 B
Rust

// 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 as *const () == &() as *const _)
}