2019-09-25 11:59:10 +00:00
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:14:5
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2019-09-25 11:59:10 +00:00
|
|
|
LL | mem::discriminant(&&Some(2));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^---------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&Some(2)`
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:3:9
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | #![deny(clippy::mem_discriminant_non_enum)]
|
2018-10-21 03:46:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<u8>`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:15:5
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(&&None::<u8>);
|
2018-10-21 03:46:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^------------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&None::<u8>`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&Foo`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:16:5
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(&&Foo::One(5));
|
2018-10-21 03:46:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&Foo::One(5)`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&Foo`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:17:5
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(&&Foo::Two(5));
|
2018-10-21 03:46:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `&Foo::Two(5)`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:21:5
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(&ro);
|
2018-10-21 03:46:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^---^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `ro`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:22:5
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(rro);
|
2018-10-21 03:46:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^---^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `*rro`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&&std::option::Option<i32>`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:23:5
|
2018-10-21 03:46:13 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(&rro);
|
2018-10-21 03:46:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^----^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `*rro`
|
|
|
|
|
2018-10-21 19:23:51 +00:00
|
|
|
error: calling `mem::discriminant` on non-enum type `&&std::option::Option<i32>`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:27:13
|
2018-10-21 19:23:51 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant($param)
|
2018-12-10 05:27:19 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-10-21 19:23:51 +00:00
|
|
|
...
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem_discriminant_but_in_a_macro!(&rro);
|
2018-10-21 19:23:51 +00:00
|
|
|
| ---------------------------------------
|
|
|
|
| | |
|
|
|
|
| | help: try dereferencing: `*rro`
|
|
|
|
| in this macro invocation
|
|
|
|
|
2018-10-25 02:27:47 +00:00
|
|
|
error: calling `mem::discriminant` on non-enum type `&&&&&std::option::Option<i32>`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:34:5
|
2018-10-25 02:27:47 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(&rrrrro);
|
2018-10-25 02:27:47 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `****rrrrro`
|
|
|
|
|
|
|
|
error: calling `mem::discriminant` on non-enum type `&&&std::option::Option<i32>`
|
2019-09-25 11:59:10 +00:00
|
|
|
--> $DIR/mem_discriminant.rs:35:5
|
2018-10-25 02:27:47 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | mem::discriminant(*rrrrro);
|
2018-10-25 02:27:47 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------^
|
|
|
|
| |
|
|
|
|
| help: try dereferencing: `****rrrrro`
|
|
|
|
|
2019-09-25 11:59:10 +00:00
|
|
|
error: aborting due to 10 previous errors
|
2018-10-21 03:46:13 +00:00
|
|
|
|