2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-27 21:43:30 +00:00
rust-clippy/tests/ui/mem_discriminant_unfixable.rs
2019-09-25 14:45:18 -07:00

16 lines
217 B
Rust

#![deny(clippy::mem_discriminant_non_enum)]
use std::mem;
enum Foo {
One(usize),
Two(u8),
}
struct A(Foo);
fn main() {
// bad
mem::discriminant(&"hello");
mem::discriminant(&A(Foo::One(0)));
}