]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: calling `mem::discriminant` on non-enum type `&str` |
2 | --> $DIR/mem_discriminant_unfixable.rs:14:5 | |
3 | | | |
4 | LL | mem::discriminant(&"hello"); | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | |
7 | note: the lint level is defined here | |
8 | --> $DIR/mem_discriminant_unfixable.rs:1:9 | |
9 | | | |
10 | LL | #![deny(clippy::mem_discriminant_non_enum)] | |
11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
12 | ||
13 | error: calling `mem::discriminant` on non-enum type `A` | |
14 | --> $DIR/mem_discriminant_unfixable.rs:15:5 | |
15 | | | |
16 | LL | mem::discriminant(&A(Foo::One(0))); | |
17 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
18 | ||
19 | error: aborting due to 2 previous errors | |
20 |