pub-enum-variant-names: make lint adhere to lint message convention
This commit is contained in:
parent
1f17c3b02b
commit
423615693b
@ -227,7 +227,7 @@ fn check_variant(
|
|||||||
cx,
|
cx,
|
||||||
lint,
|
lint,
|
||||||
span,
|
span,
|
||||||
&format!("All variants have the same {}fix: `{}`", what, value),
|
&format!("all variants have the same {}fix: `{}`", what, value),
|
||||||
None,
|
None,
|
||||||
&format!(
|
&format!(
|
||||||
"remove the {}fixes and use full paths to \
|
"remove the {}fixes and use full paths to \
|
||||||
|
@ -24,7 +24,7 @@ error: Variant name starts with the enum's name
|
|||||||
LL | FoodBad,
|
LL | FoodBad,
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: All variants have the same prefix: `Food`
|
error: all variants have the same prefix: `Food`
|
||||||
--> $DIR/enum_variants.rs:26:1
|
--> $DIR/enum_variants.rs:26:1
|
||||||
|
|
|
|
||||||
LL | / enum Food {
|
LL | / enum Food {
|
||||||
@ -36,7 +36,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
||||||
|
|
||||||
error: All variants have the same prefix: `CallType`
|
error: all variants have the same prefix: `CallType`
|
||||||
--> $DIR/enum_variants.rs:36:1
|
--> $DIR/enum_variants.rs:36:1
|
||||||
|
|
|
|
||||||
LL | / enum BadCallType {
|
LL | / enum BadCallType {
|
||||||
@ -48,7 +48,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
||||||
|
|
||||||
error: All variants have the same prefix: `Constant`
|
error: all variants have the same prefix: `Constant`
|
||||||
--> $DIR/enum_variants.rs:48:1
|
--> $DIR/enum_variants.rs:48:1
|
||||||
|
|
|
|
||||||
LL | / enum Consts {
|
LL | / enum Consts {
|
||||||
@ -60,7 +60,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
||||||
|
|
||||||
error: All variants have the same prefix: `With`
|
error: all variants have the same prefix: `With`
|
||||||
--> $DIR/enum_variants.rs:82:1
|
--> $DIR/enum_variants.rs:82:1
|
||||||
|
|
|
|
||||||
LL | / enum Seallll {
|
LL | / enum Seallll {
|
||||||
@ -72,7 +72,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
||||||
|
|
||||||
error: All variants have the same prefix: `Prefix`
|
error: all variants have the same prefix: `Prefix`
|
||||||
--> $DIR/enum_variants.rs:88:1
|
--> $DIR/enum_variants.rs:88:1
|
||||||
|
|
|
|
||||||
LL | / enum NonCaps {
|
LL | / enum NonCaps {
|
||||||
@ -84,7 +84,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
= help: remove the prefixes and use full paths to the variants instead of glob imports
|
||||||
|
|
||||||
error: All variants have the same prefix: `With`
|
error: all variants have the same prefix: `With`
|
||||||
--> $DIR/enum_variants.rs:94:1
|
--> $DIR/enum_variants.rs:94:1
|
||||||
|
|
|
|
||||||
LL | / pub enum PubSeall {
|
LL | / pub enum PubSeall {
|
||||||
|
Loading…
Reference in New Issue
Block a user