rust/tests/ui/mem_discriminant.stderr

95 lines
3.3 KiB
Plaintext

error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:14:5
|
LL | mem::discriminant(&&Some(2));
| ^^^^^^^^^^^^^^^^^^---------^
| |
| help: try dereferencing: `&Some(2)`
|
note: the lint level is defined here
--> $DIR/mem_discriminant.rs:3:9
|
LL | #![deny(clippy::mem_discriminant_non_enum)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: calling `mem::discriminant` on non-enum type `&std::option::Option<u8>`
--> $DIR/mem_discriminant.rs:15:5
|
LL | mem::discriminant(&&None::<u8>);
| ^^^^^^^^^^^^^^^^^^------------^
| |
| help: try dereferencing: `&None::<u8>`
error: calling `mem::discriminant` on non-enum type `&Foo`
--> $DIR/mem_discriminant.rs:16:5
|
LL | mem::discriminant(&&Foo::One(5));
| ^^^^^^^^^^^^^^^^^^-------------^
| |
| help: try dereferencing: `&Foo::One(5)`
error: calling `mem::discriminant` on non-enum type `&Foo`
--> $DIR/mem_discriminant.rs:17:5
|
LL | mem::discriminant(&&Foo::Two(5));
| ^^^^^^^^^^^^^^^^^^-------------^
| |
| help: try dereferencing: `&Foo::Two(5)`
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:21:5
|
LL | mem::discriminant(&ro);
| ^^^^^^^^^^^^^^^^^^---^
| |
| help: try dereferencing: `ro`
error: calling `mem::discriminant` on non-enum type `&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:22:5
|
LL | mem::discriminant(rro);
| ^^^^^^^^^^^^^^^^^^---^
| |
| help: try dereferencing: `*rro`
error: calling `mem::discriminant` on non-enum type `&&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:23:5
|
LL | mem::discriminant(&rro);
| ^^^^^^^^^^^^^^^^^^----^
| |
| help: try dereferencing: `*rro`
error: calling `mem::discriminant` on non-enum type `&&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:27:13
|
LL | mem::discriminant($param)
| ^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | mem_discriminant_but_in_a_macro!(&rro);
| ---------------------------------------
| | |
| | help: try dereferencing: `*rro`
| in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: calling `mem::discriminant` on non-enum type `&&&&&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:34:5
|
LL | mem::discriminant(&rrrrro);
| ^^^^^^^^^^^^^^^^^^-------^
| |
| help: try dereferencing: `****rrrrro`
error: calling `mem::discriminant` on non-enum type `&&&std::option::Option<i32>`
--> $DIR/mem_discriminant.rs:35:5
|
LL | mem::discriminant(*rrrrro);
| ^^^^^^^^^^^^^^^^^^-------^
| |
| help: try dereferencing: `****rrrrro`
error: aborting due to 10 previous errors