mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
16 lines
332 B
Rust
16 lines
332 B
Rust
//@ run-pass
|
|
struct NoDerive(#[allow(dead_code)] i32);
|
|
|
|
#[derive(PartialEq)]
|
|
struct WrapEmbedded(*const NoDerive);
|
|
|
|
const WRAP_UNSAFE_EMBEDDED: &&WrapEmbedded = &&WrapEmbedded(std::ptr::null());
|
|
|
|
fn main() {
|
|
let b = match WRAP_UNSAFE_EMBEDDED {
|
|
WRAP_UNSAFE_EMBEDDED => true,
|
|
_ => false,
|
|
};
|
|
assert!(b);
|
|
}
|