mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-28 07:30:57 +00:00
Add limitation description for enum_variant_names
`enum_variant_names` will consider characters with no case to be a part of prefixes/suffixes substring that are compared. This means `Foo1` and `Foo2` has different prefixes (`Foo1` and `Foo2` prefix respeectively). This applies to all non-ascii characters with no casing.
This commit is contained in:
parent
6f7e5cbe21
commit
b82c9ce3af
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,12 @@ declare_clippy_lint! {
|
||||||
/// Enumeration variant names should specify their variant,
|
/// Enumeration variant names should specify their variant,
|
||||||
/// not repeat the enumeration name.
|
/// not repeat the enumeration name.
|
||||||
///
|
///
|
||||||
|
/// ### Limitations
|
||||||
|
/// Characters with no casing will be considered when comparing prefixes/suffixes
|
||||||
|
/// This applies to numbers and non-ascii characters without casing
|
||||||
|
/// e.g. `Foo1` and `Foo2` is considered to have different prefixes
|
||||||
|
/// (the prefixes are `Foo1` and `Foo2` respectively), as also `Bar螃`, `Bar蟹`
|
||||||
|
///
|
||||||
/// ### Example
|
/// ### Example
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// enum Cake {
|
/// enum Cake {
|
||||||
|
|
Loading…
Reference in a new issue