mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Don't suggest an empty variant name in enum_variant_names
This commit is contained in:
parent
8bb4690487
commit
7c563175c7
@ -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…
Reference in New Issue
Block a user