rust/src/test/compile-fail/issue-3096-2.rs
Tim Chevalier 3639d38d5c Add a demoded version of ptr::addr_of
Currently, the new version is ptr::p2::addr_of and the old one is
ptr::addr_of. This is kind of cheesy, but I need a snapshot before I
can ditch the old version, since the pipe compiler generates calls to
addr_of.

core is converted over to use the new version, std is not.
2012-09-28 22:19:01 -07:00

7 lines
128 B
Rust

enum bottom { }
fn main() {
let x = ptr::p2::addr_of(&()) as *bottom;
match x { } //~ ERROR non-exhaustive patterns
}