2019-09-25 06:59:10 -05:00
|
|
|
error: calling `mem::discriminant` on non-enum type `&str`
|
|
|
|
--> $DIR/mem_discriminant_unfixable.rs:14:5
|
|
|
|
|
|
|
|
|
LL | mem::discriminant(&"hello");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-01-31 13:21:10 -06:00
|
|
|
note: the lint level is defined here
|
2019-09-25 06:59:10 -05:00
|
|
|
--> $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
|
|
|
|
|