mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 08:30:45 +00:00
20 lines
606 B
Text
20 lines
606 B
Text
error: calling `mem::discriminant` on non-enum type `&str`
|
|
--> $DIR/mem_discriminant_unfixable.rs:14:5
|
|
|
|
|
LL | mem::discriminant(&"hello");
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/mem_discriminant_unfixable.rs:1:9
|
|
|
|
|
LL | #![deny(clippy::mem_discriminant_non_enum)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: calling `mem::discriminant` on non-enum type `A`
|
|
--> $DIR/mem_discriminant_unfixable.rs:15:5
|
|
|
|
|
LL | mem::discriminant(&A(Foo::One(0)));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|