mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Fix reversed suggestion on postfix
This commit is contained in:
parent
8ed723bb1f
commit
c8f016f921
@ -185,7 +185,10 @@ fn check_variant(cx: &LateContext<'_>, threshold: u64, def: &EnumDef<'_>, item_n
|
|||||||
let (what, value) = match (pre.is_empty(), post.is_empty()) {
|
let (what, value) = match (pre.is_empty(), post.is_empty()) {
|
||||||
(true, true) => return,
|
(true, true) => return,
|
||||||
(false, _) => ("pre", pre.join("")),
|
(false, _) => ("pre", pre.join("")),
|
||||||
(true, false) => ("post", post.join("")),
|
(true, false) => {
|
||||||
|
post.reverse();
|
||||||
|
("post", post.join(""))
|
||||||
|
},
|
||||||
};
|
};
|
||||||
span_lint_and_help(
|
span_lint_and_help(
|
||||||
cx,
|
cx,
|
||||||
|
@ -96,7 +96,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 postfix: `DataI`
|
error: all variants have the same postfix: `IData`
|
||||||
--> $DIR/enum_variants.rs:136:1
|
--> $DIR/enum_variants.rs:136:1
|
||||||
|
|
|
|
||||||
LL | / enum IDataRequest {
|
LL | / enum IDataRequest {
|
||||||
@ -108,7 +108,7 @@ LL | | }
|
|||||||
|
|
|
|
||||||
= help: remove the postfixes and use full paths to the variants instead of glob imports
|
= help: remove the postfixes and use full paths to the variants instead of glob imports
|
||||||
|
|
||||||
error: all variants have the same postfix: `DataIH`
|
error: all variants have the same postfix: `HIData`
|
||||||
--> $DIR/enum_variants.rs:142:1
|
--> $DIR/enum_variants.rs:142:1
|
||||||
|
|
|
|
||||||
LL | / enum HIDataRequest {
|
LL | / enum HIDataRequest {
|
||||||
|
Loading…
Reference in New Issue
Block a user