mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-03-02 22:37:23 +00:00
Auto merge of #8329 - Alexendoo:enum-variant-names, r=giraffate
Don't suggest an empty variant name in `enum_variant_names` changelog: false positive fix: [`enum_variant_names`]: No longer suggests an empty variant name Fixes #8324
This commit is contained in:
commit
f4709e6f1d
2 changed files with 10 additions and 0 deletions
|
@ -172,6 +172,9 @@ fn check_variant(cx: &LateContext<'_>, threshold: u64, def: &EnumDef<'_>, item_n
|
|||
let name = var.ident.name.as_str();
|
||||
|
||||
let variant_split = camel_case_split(name);
|
||||
if variant_split.len() == 1 {
|
||||
return;
|
||||
}
|
||||
|
||||
pre = pre
|
||||
.iter()
|
||||
|
|
|
@ -151,4 +151,11 @@ enum North {
|
|||
NoRight,
|
||||
}
|
||||
|
||||
// #8324
|
||||
enum Phase {
|
||||
PreLookup,
|
||||
Lookup,
|
||||
PostLookup,
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
Loading…
Add table
Reference in a new issue