8b02dac542
side effect for `enum_variants`: use .first() instead of .get(0) in enum_variants lint move to_camel_case to str_util module move module, enum and struct name repetitions check to a single file `item_name_repetitions` rename enum_variants threshold config option
33 lines
446 B
Rust
33 lines
446 B
Rust
#![warn(clippy::struct_field_names)]
|
|
|
|
struct Data {
|
|
a_data: u8,
|
|
b_data: u8,
|
|
c_data: u8,
|
|
d_data: u8,
|
|
}
|
|
struct Data2 {
|
|
//~^ ERROR: all fields have the same postfix
|
|
a_data: u8,
|
|
b_data: u8,
|
|
c_data: u8,
|
|
d_data: u8,
|
|
e_data: u8,
|
|
}
|
|
enum Foo {
|
|
AFoo,
|
|
BFoo,
|
|
CFoo,
|
|
DFoo,
|
|
}
|
|
enum Foo2 {
|
|
//~^ ERROR: all variants have the same postfix
|
|
AFoo,
|
|
BFoo,
|
|
CFoo,
|
|
DFoo,
|
|
EFoo,
|
|
}
|
|
|
|
fn main() {}
|