There is right now, if you don’t explicitly turn off unused variable warnings with #[allow(unused)]. Comment out the allows at the top and you get this output:
Compiling playground v0.0.1 (/playground)
warning: variant `MAGIC_LAMP` should have an upper camel case name
--> src/main.rs:8:5
|
8 | MAGIC_LAMP,
| ^^^^^^^^^^ help: convert the identifier to upper camel case: `MagicLamp`
|
= note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default
warning: variant `DEATH_DOLL` should have an upper camel case name
--> src/main.rs:9:5
|
9 | DEATH_DOLL,
| ^^^^^^^^^^ help: convert the identifier to upper camel case: `DeathDoll`
warning: variant `SCROLL_OF_EXIT` should have an upper camel case name
--> src/main.rs:10:5
|
10 | SCROLL_OF_EXIT,
| ^^^^^^^^^^^^^^ help: convert the identifier to upper camel case: `ScrollOfExit`
warning: unnecessary parentheses around `match` scrutinee expression
--> src/main.rs:15:22
|
15 | return match (self) {
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
15 - return match (self) {
15 + return match self {
|
warning: unused variable: `SCROLL_EXIT`
--> src/main.rs:21:13
|
21 | SCROLL_EXIT => "Scroll of Exit",
| ^^^^^^^^^^^
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
help: you might have meant to pattern match on the similarly named variant `SCROLL_OF_EXIT`
|
21 - SCROLL_EXIT => "Scroll of Exit",
21 + PlayerItemTypes::SCROLL_OF_EXIT => "Scroll of Exit",
|
help: if this is intentional, prefix it with an underscore
|
21 | _SCROLL_EXIT => "Scroll of Exit",
| +
warning: method `GetDisplayName` should have a snake case name
--> src/main.rs:14:12
|
14 | pub fn GetDisplayName(&self) -> &str {
| ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `get_display_name`
|
= note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
warning: variable `SCROLL_EXIT` should have a snake case name
--> src/main.rs:21:13
|
21 | SCROLL_EXIT => "Scroll of Exit",
| ^^^^^^^^^^^ help: convert the identifier to snake case: `scroll_exit`
warning: `playground` (bin "playground") generated 7 warnings (run `cargo fix --bin "playground" -p playground` to apply 2 suggestions)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.00s
Running `target/debug/playground`