2018-10-21 05:46:13 +02:00
|
|
|
error: calling `mem::discriminant` on non-enum type `&str`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:23:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
23 | mem::discriminant(&"hello");
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:10:9
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
10 | #![deny(clippy::mem_discriminant_non_enum)]
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:24:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
24 | mem::discriminant(&&Some(2));
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^---------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&Some(2)`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<u8>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:25:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
25 | mem::discriminant(&&None::<u8>);
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^------------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&None::<u8>`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&Foo`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:26:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
26 | mem::discriminant(&&Foo::One(5));
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&Foo::One(5)`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&Foo`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:27:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
27 | mem::discriminant(&&Foo::Two(5));
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&Foo::Two(5)`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `A`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:28:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
28 | mem::discriminant(&A(Foo::One(0)));
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:32:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
32 | mem::discriminant(&ro);
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^---^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `ro`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:33:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
33 | mem::discriminant(rro);
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^---^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `*rro`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&&std::option::Option<i32>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:34:5
|
2018-10-21 05:46:13 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
34 | mem::discriminant(&rro);
|
2018-10-21 05:46:13 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^----^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `*rro`
|
|
|
|
|
2018-10-21 21:23:51 +02:00
|
|
|
error: calling `mem::discriminant` on non-enum type `&&std::option::Option<i32>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:38:13
|
2018-10-21 21:23:51 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
38 | mem::discriminant($param)
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-10-21 21:23:51 +02:00
|
|
|
...
|
2018-12-10 06:27:19 +01:00
|
|
|
42 | mem_discriminant_but_in_a_macro!(&rro);
|
2018-10-21 21:23:51 +02:00
|
|
|
| ---------------------------------------
|
|
|
|
| | |
|
|
|
|
| | help: try dereferencing: `*rro`
|
|
|
|
| in this macro invocation
|
|
|
|
|
2018-10-25 04:27:47 +02:00
|
|
|
error: calling `mem::discriminant` on non-enum type `&&&&&std::option::Option<i32>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:45:5
|
2018-10-25 04:27:47 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
45 | mem::discriminant(&rrrrro);
|
2018-10-25 04:27:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `****rrrrro`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&&&std::option::Option<i32>`
|
2018-12-10 06:27:19 +01:00
|
|
|
--> $DIR/mem_discriminant.rs:46:5
|
2018-10-25 04:27:47 +02:00
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
46 | mem::discriminant(*rrrrro);
|
2018-10-25 04:27:47 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `****rrrrro`
|
|
|
|
|
|
|
|
error: aborting due to 12 previous errors
|
2018-10-21 05:46:13 +02:00
|
|
|
|