Commit Graph

6969 Commits

Author SHA1 Message Date
Cameron Steffen
eb80da175c Fix Visitor::NestedFilter in Clippy 2022-01-16 16:02:36 -06:00
Cameron Steffen
94dd91524b Format clippy 2022-01-16 16:02:36 -06:00
Marek Downar
5b6ec8c57d
#8214 cmp_owned suggestion flips the comparison 2022-01-16 20:27:00 +01:00
Piotr Mikulski
36396c6b97 Fix tests 2022-01-16 10:33:30 -08:00
Piotr Mikulski
d48d247309 Fix clippy warnings 2022-01-16 10:19:48 -08:00
Piotr Mikulski
1c9b31d350 New line: cloned_next 2022-01-16 09:59:29 -08:00
Elliot Bobrow
fb5f51d3eb fix op_ref false positive 2022-01-16 09:20:33 -08:00
bors
0d27bd846c Auto merge of #8295 - Jarcho:useless_format_8290, r=giraffate
Handle implicit named arguments in `useless_format`

fixes #8290

Ideally this would fix the macro parsing code to handle this, but this is a smaller change and easier to back port.

changelog: Handle implicit named arguments in `useless_format`
2022-01-16 13:24:08 +00:00
bors
f4a88f23c1 Auto merge of #92805 - BoxyUwU:revert-lazy-anon-const-substs, r=lcnr
partially revertish `lazily "compute" anon const default substs`

reverts #87280 except for some of the changes around `ty::Unevaluated` having a visitor and a generic for promoted
why revert: <https://github.com/rust-lang/rust/pull/92805#issuecomment-1010736049>

r? `@lcnr`
2022-01-16 11:19:21 +00:00
bors
27845a9205 Auto merge of #8274 - andrewarchi:master, r=camsteffen
Update markdown-it version

Fixes improperly-escaped pipes in Markdown tables for the [documentation of bad_bit_mask](https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask) and [ineffective_bit_mask](https://rust-lang.github.io/rust-clippy/master/index.html#ineffective_bit_mask). A column pipe takes precedence over inline code markers, so some back ticks are displayed literally and the pipes need to be escaped. I found no other occurrences of the same problem when searching rust-clippy by ```\|.*`.*\|```.

changelog: Update markdown-it version
2022-01-15 22:17:37 +00:00
Jason Newcomb
cb384ff03b Handle implicit named arguments in useless_format 2022-01-15 16:28:49 -05:00
Marek Downar
49502727e7
issue #8239: fix to prev commit && 4 test cases 2022-01-15 22:19:01 +01:00
Camille GILLOT
0a48547140 Return a LocalDefId in get_parent_item. 2022-01-15 21:26:20 +01:00
Marek Downar
ee84ac3396
issue #8239: Printed hint for lint or_fun_call is cropped and does not show the solution 2022-01-15 15:51:46 +01:00
Jason Newcomb
70a6d7b012 Erase late bound regions in iter_not_returning_iterator 2022-01-15 00:15:25 -05:00
Ellen
fb86f844a4 nyahggdshjjghsdfhgsf 2022-01-15 01:16:55 +00:00
Ellen
377870a136 initial revert 2022-01-15 01:16:55 +00:00
xFrednet
1afeb71065
Track msrv attribute for manual_bits and borrow_as_prt 2022-01-15 00:57:43 +01:00
xFrednet
9e7858545a
Add msrv config for map_clone 2022-01-14 23:45:05 +01:00
bors
7a4acf9fa6 Auto merge of #8231 - Jarcho:implicit_clone_8227, r=camsteffen
Fix `implicit_clone` for `&&T`

fixes #8227

changelog: Don't lint `implicit_clone` on `&&T`
2022-01-14 22:17:29 +00:00
Andrew Archibald
adc3e669fa Escape pipes in Markdown tables 2022-01-13 13:20:30 -07:00
SeeSpring
875b240083 Apply not_unsafe_ptr_arg_deref to type aliases 2022-01-13 09:47:56 -05:00
flip1995
fb0142ae41 Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyup 2022-01-13 13:18:19 +01:00
flip1995
8a2141bae4
Bump Clippy Version -> 0.1.60 2022-01-13 12:48:08 +01:00
flip1995
11be495bde
Merge remote-tracking branch 'upstream/master' into rustup 2022-01-13 12:47:48 +01:00
Jason Newcomb
7ed86bf822 Changes to ptr_arg
* Track the argument when used to initialize simple `let` bindings
* Check if the argument is passed to a function requiring the original type
* Use `multipart_suggestion` rather than multiple suggestions
* Check if the name given in the source code matches the name of the actual type
2022-01-12 20:57:50 -05:00
bors
60e68d68c6 Auto merge of #8226 - Jarcho:manual_memcpy_8160, r=flip1995
`manual_memcpy` fix

fixes #8160

Ideally this would work with `VecDeque`, but the current interface is unsuitable for it. At a minimum something like `range_as_slices` would be needed.

changelog: Don't lint `manual_memcpy` on `VecDeque`
changelog: Suggest `copy_from_slice` for `manual_memcpy` when applicable
2022-01-12 18:44:34 +00:00
Jason Newcomb
ad95279c34 Suggest deref when needed in implicit_clone 2022-01-12 13:03:38 -05:00
Tomasz Miąsko
d389cfccb5 Remove LLVM-style inline assembly from clippy 2022-01-12 18:51:32 +01:00
bors
6f33f690ea Auto merge of #8112 - Alexendoo:disallowed_methods_primitives, r=flip1995
Allow primitive types in disallowed_methods

Fixes #8079

changelog: `disallowed_methods`: Now can disallow methods of primitive types
2022-01-12 16:47:45 +00:00
Alex Macleod
04eb27aeaf Use method name from conf::DisallowedMethod
Since def_path_str returns e.g. "core::f32::<impl f32>::clamp" for
"f32::clamp"
2022-01-12 16:23:22 +00:00
Paolo Barbolini
166737f3cb Add manual_bits lint 2022-01-12 16:46:57 +01:00
bors
ae01c4ab3c Auto merge of #8190 - camsteffen:no-in-band-liftetimes, r=flip1995
Stop using `in_band_lifetimes`

Per rust-lang/rust#91867

changelog: none
2022-01-12 14:25:11 +00:00
bors
0d94167a23 Auto merge of #8198 - camsteffen:no-method-call-macro, r=flip1995
Remove method_call! macro

This is possible now that `SymbolStr` is removed from rustc.

changelog: none
2022-01-12 13:59:12 +00:00
Jason Newcomb
d32277d78e Don't lint deref_addrof when the two operations occur in different expansions 2022-01-12 00:25:42 -05:00
bors
88f5be2041 Auto merge of #8262 - 1nF0rmed:chore-update-borrowed-box-doc, r=camsteffen
Improve documentation for `borrowed-box` lint

fixes #8161

Updates documentation to elaborate more on how removing Box from a function parameter can generalize the function.

changelog: none
2022-01-11 17:07:50 +00:00
Pradyumna Rahul
7e989ec07a Improve documentation for borrowed-box lint 2022-01-11 22:02:15 +05:30
Cameron Steffen
02ec39b2ff Stop using in_band_lifetimes 2022-01-11 09:52:23 -06:00
Aaron Hill
dda2aef64f Store a Symbol instead of an Ident in VariantDef/FieldDef
The field is also renamed from `ident` to `name. In most cases,
we don't actually need the `Span`. A new `ident` method is added
to `VariantDef` and `FieldDef`, which constructs the full `Ident`
using `tcx.def_ident_span()`. This method is used in the cases
where we actually need an `Ident`.

This makes incremental compilation properly track changes
to the `Span`, without all of the invalidations caused by storing
a `Span` directly via an `Ident`.
2022-01-11 10:16:22 -05:00
Federico Guerinoni
3298de7f66 Add borrow_as_ptr lint
Closes: #6995

Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
2022-01-11 09:53:29 +01:00
bors
fccf07bae5 Auto merge of #8260 - taiki-e:mutex_atomic, r=llogiq
Downgrade mutex_atomic to nursery

See #1516 and #4295.

There are suggestions about removing this lint from the default warned lints in both issues.
Also, [`mutex_integer`](https://rust-lang.github.io/rust-clippy/master/index.html#mutex_integer) lint that has the same problems as this lint is in `nursery` group.

changelog: Moved [`mutex_atomic`] to `nursery`
2022-01-11 08:09:11 +00:00
Taiki Endo
5f143c603e Warn disallowed_methods and disallowed_types by default 2022-01-11 02:17:14 +09:00
Taiki Endo
cf86cee4fe Downgrade mutex_atomic to nursery 2022-01-10 23:36:13 +09:00
bors
b66dbe87f1 Auto merge of #8228 - Jarcho:iter_not_returning_iterator_8225, r=giraffate
fix `iter_not_returning_iterator`

fixes #8225

changelog: Handle type projections in `iter_not_returning_iterator`
changelog: Don't lint `iter_not_returning_iterator` in trait implementations
changelog: Lint `iter_not_returning_iterator` in trait definitions
2022-01-10 12:34:15 +00:00
bors
1816361738 Auto merge of #8257 - camsteffen:internal-features, r=giraffate
Combine internal cargo features

changelog: none

This is just simpler and I don't see any downsides.
2022-01-10 12:18:05 +00:00
bors
88cfd70100 Auto merge of #8252 - dswij:8229, r=xFrednet
cover trait for `trait_duplication_in_bounds`

closes #8229

changelog: [`trait_duplication_in_bounds`] covers trait functions with `Self` bounds
2022-01-10 10:31:59 +00:00
dswij
f4dc348ad5 trait_duplication_in_bounds Update description and add test 2022-01-10 12:45:22 +08:00
Cameron Steffen
e2ce4f9462 Combine internal features in clippy_lints 2022-01-09 18:35:12 -06:00
Cameron Steffen
16d848891d Combine internal features in clippy_utils 2022-01-09 18:24:51 -06:00
bors
59916952c9 Auto merge of #8236 - PatchMixolydic:single_char_lifetime_names, r=llogiq
new lint: `single_char_lifetime_names`

This pull request adds a lint against single character lifetime names, as they might not divulge enough information about the purpose of the lifetime. This can make code harder to understand. I placed this in `restriction` rather than `pedantic` (as suggested in #8233) since most of the Rust ecosystem already uses single character lifetime names (to my knowledge, at least) and since single character lifetime names aren't incorrect. I'd be happy to change this upon request, however. Fixes #8233.

- [x] Followed lint naming conventions
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `cargo dev update_lints`
- [x] Added lint documentation
- [x] Run `cargo dev fmt`

changelog: new lint: [`single_char_lifetime_names`]
2022-01-09 14:27:36 +00:00
bors
a6f80fccb1 new lint: single_char_lifetime_names
This pull request adds a lint against single character lifetime names, as they might not divulge enough information about the purpose of the lifetime. This can make code harder to understand. I placed this in `restriction` rather than `pedantic` (as suggested in #8233) since most of the Rust ecosystem already uses single character lifetime names (to my knowledge, at least) and since single character lifetime names aren't incorrect. I'd be happy to change this upon request, however. Fixes #8233.

- [x] Followed lint naming conventions
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `cargo dev update_lints`
- [x] Added lint documentation
- [x] Run `cargo dev fmt`

changelog: new lint: [`single_char_lifetime_names`]
2022-01-09 14:27:36 +00:00
dswij
f690978023 cover trait for trait_duplication_in_bounds 2022-01-09 13:35:01 +08:00
Vadim Petrochenkov
c8ea0420cb rustc_metadata: Rename item_children(_untracked) to module_children(_untracked)
And `each_child_of_item` to `for_each_module_child`
2022-01-09 09:22:06 +08:00
bors
917890babb Auto merge of #8201 - smoelius:master, r=camsteffen
Change `unnecessary_to_owned` `into_iter` suggestions to `MaybeIncorrect`

I am having a hard time finding a good solution for #8148, so I am wondering if is enough to just change the suggestion's applicability to `MaybeIncorrect`?

I apologize, as I realize this is a bit of a cop out.

changelog: none
2022-01-08 16:33:48 +00:00
Samuel E. Moelius III
366234a515 Add unnecessary_to_owned "Known problems" section 2022-01-08 09:09:52 -05:00
Matthew Jasper
c34e3f0f83 Update clippy for associated item changes 2022-01-07 13:31:46 -08:00
Jason Newcomb
d98339d3e0 Handle type projections in iter_not_returning_iterator 2022-01-05 17:19:13 -05:00
Jason Newcomb
2cc38a2322 Lint iter_not_returning_iterator on the trait definition rather than the implementation 2022-01-05 13:46:35 -05:00
Jason Newcomb
3925def9cf Suggest copy_from_slice for manual_memcpy when possible 2022-01-05 12:35:35 -05:00
Jason Newcomb
14f34454b0 Don't lint DequeVec in manual_memcpy 2022-01-05 12:28:20 -05:00
Samuel E. Moelius III
a4ebf6f78e Change unnecessary_to_owned into_iter suggestions to MaybeIncorrect 2022-01-05 05:05:36 -05:00
bors
92048f4826 Auto merge of #8221 - Jarcho:while_let_on_iterator_8113, r=llogiq
Better detect when a field can be moved from in `while_let_on_iterator`

fixes #8113

changelog: Better detect when a field can be moved from in `while_let_on_iterator`
2022-01-05 06:45:58 +00:00
bors
20f2a89026 Auto merge of #8224 - Jarcho:type_repetition_in_bounds_8162, r=llogiq
Fix `type_repetition_in_bounds`

fixes #7360
fixes #8162
fixes #8056

changelog: Check for full equality in `type_repetition_in_bounds` rather than just equal hashes
2022-01-05 01:05:18 +00:00
bors
d5dcda2f42 Auto merge of #8223 - camsteffen:remove-in-macro, r=llogiq
Remove in_macro from clippy_utils

changelog: none

Previously done in #7897 but reverted in #8170. I'd like to keep `in_macro` out of utils because if a span is from expansion in any way (desugaring or macro), we should not proceed without understanding the nature of the expansion IMO.

r? `@llogiq`
2022-01-05 00:49:23 +00:00
bors
786f874c34 New macro utils
changelog: none

Sorry, this is a big one. A lot of interrelated changes and I wanted to put the new utils to use to make sure they are somewhat battle-tested. We may want to divide some of the lint-specific refactoring commits into batches for smaller reviewing tasks. I could also split into more PRs.

Introduces a bunch of new utils at `clippy_utils::macros::...`. Please read through the docs and give any feedback! I'm happy to introduce `MacroCall` and various functions to retrieve an instance. It feels like the missing puzzle piece. I'm also introducing `ExpnId` from rustc as "useful for Clippy too". `@rust-lang/clippy`

Fixes #7843 by not parsing every node of macro implementations, at least the major offenders.

I probably want to get rid of `is_expn_of` at some point.
2022-01-04 22:32:02 +00:00
Matthias Krüger
d7a60337fc Rollup merge of #91907 - lcnr:const-arg-infer, r=BoxyUwU
Allow `_` as the length of array types and repeat expressions

r? `@BoxyUwU` cc `@varkor`
2022-01-04 21:23:06 +01:00
Jason Newcomb
2dd216a186 Check for full equality in type_repetition_in_bounds rather than just equal hashes 2022-01-04 14:28:27 -05:00
Cameron Steffen
00da1b8f14 Remove in_macro from utils 2022-01-04 12:07:42 -06:00
Jason Newcomb
ff58efb2b2 Better detect when a field can be moved from in while_let_on_iterator 2022-01-03 23:13:31 -05:00
Wigy
e8b6b2ac0c
erasing_op lint ignored when output type is different from the non-const one 2022-01-02 19:36:02 +01:00
bors
b25dbc6a4d Auto merge of #8208 - nmathewson:selfkind_no_fix, r=xFrednet
wrong_self_convention: Match `SelfKind::No` more restrictively

The `wrong_self_convention` lint uses a `SelfKind` type to decide
whether a method has the right kind of "self" for its name, or whether
the kind of "self" it has makes its name confusable for a method in
a common trait.  One possibility is `SelfKind::No`, which is supposed
to mean "No `self`".

Previously, SelfKind::No matched everything _except_ Self, including
references to Self.  This patch changes it to match Self, &Self, &mut
Self, Box<Self>, and so on.

For example, this kind of method was allowed before:

```
impl S {
    // Should trigger the lint, because
    // "methods called `is_*` usually take `self` by reference or no `self`"
    fn is_foo(&mut self) -> bool { todo!() }
}
```

But since SelfKind::No matched "&mut self", no lint was triggered
(see #8142).

With this patch, the code above now gives a lint as expected.

fixes #8142

changelog: [`wrong_self_convention`] rejects `self` references in more cases
2022-01-02 17:14:18 +00:00
bors
262b148d88 return_self_not_must_use document #[must_use] on the type
Inspired by a discussion in rust-lang/rust-clippy#8197

---

r? `@llogiq`

changelog: none

The lint is this on nightly, therefore no changelog entry for you xD
2022-01-01 13:16:49 +00:00
Nick Mathewson
3d41358a55 wrong_self_convention: Match SelfKind::No more restrictively
The `wrong_self_convention` lint uses a `SelfKind` type to decide
whether a method has the right kind of "self" for its name, or whether
the kind of "self" it has makes its name confusable for a method in
a common trait.  One possibility is `SelfKind::No`, which is supposed
to mean "No `self`".

Previously, SelfKind::No matched everything _except_ Self, including
references to Self.  This patch changes it to match Self, &Self, &mut
Self, Box<Self>, and so on.

For example, this kind of method was allowed before:

```
impl S {
    // Should trigger the lint, because
    // "methods called `is_*` usually take `self` by reference or no `self`"
    fn is_foo(&mut self) -> bool { todo!() }
}
```

But since SelfKind::No matched "&mut self", no lint was triggered
(see #8142).

With this patch, the code above now gives a lint as expected.

Fixes #8142

changelog: [`wrong_self_convention`] rejects `self` references in more cases
2021-12-31 23:39:40 -05:00
bors
c736a63123 Auto merge of #8193 - ebobrow:redundant_closure_fp, r=Manishearth
fix [`redundant_closure`] fp with `Rc<F>`/`Arc<F>`

fixes #8073

changelog: don't trigger [`redundant_closure`] on `Arc<F>` or `Rc<F>`
2021-12-31 19:01:42 +00:00
Nick Mathewson
b6bcf0c51b unused_io_amount: Use span_lint_and_help.
This improves the quality of the genrated output and makes it
more in line with other lint messages.

changelog: [`unused_io_amount`]: Improve help text
2021-12-31 12:21:43 -05:00
Nick Mathewson
65d1f83d2c Extend [unused_io_amount] to cover AsyncRead and AsyncWrite.
Clippy helpfully warns about code like this, telling you that you
probably meant "write_all":

    fn say_hi<W:Write>(w: &mut W) {
       w.write(b"hello").unwrap();
    }

This patch attempts to extend the lint so it also covers this
case:

    async fn say_hi<W:AsyncWrite>(w: &mut W) {
       w.write(b"hello").await.unwrap();
    }

(I've run into this second case several times in my own programming,
and so have my coworkers, so unless we're especially accident-prone
in this area, it's probably worth addressing?)

This patch covers the Async{Read,Write}Ext traits in futures-rs,
and in tokio, since both are quite widely used.

changelog: [`unused_io_amount`] now supports AsyncReadExt and AsyncWriteExt.
2021-12-31 12:10:59 -05:00
bors
1f3d6a669e Auto merge of #92252 - GuillaumeGomez:update-pulldown, r=camelid,xFrednet
Update pulldown-cmark version to 0.9

Fixes https://github.com/rust-lang/rust/issues/92206.

r? `@camelid`
2021-12-31 12:46:38 +00:00
Cameron Steffen
2b5257e4c7 Remove method_call! macro 2021-12-30 13:37:14 -06:00
flip1995
97ab44ca97 Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup 2021-12-30 15:10:43 +01:00
flip1995
e45842e360
Merge remote-tracking branch 'upstream/master' into rustup 2021-12-30 14:17:53 +01:00
Elliot Bobrow
828ddbe414 fix [redundant_closure] fp with Arc 2021-12-29 09:05:04 -08:00
bors
c1cd64b9c6 Auto merge of #8117 - hotate29:issue7320, r=camsteffen
update: ```Sugg::not()``` replacing the comparison operator. #7320

fixes #7320

changelog: ```needless_bool```: Changed to make a smart suggestion.
2021-12-28 22:15:53 +00:00
bors
16ef044e72 Auto merge of #8183 - alex-ozdemir:limit-ident, r=camsteffen
Limit the ``[`identity_op`]`` lint to integral operands.

changelog: limit ``[`identity_op`]`` to integral operands

In the ``[`identity_op`]`` lint, if the operands are non-integers, then the lint is likely
wrong.
2021-12-28 22:01:57 +00:00
bors
a139949ead Auto merge of #8187 - ApamNapat:fix_7651, r=llogiq
Fixed issues with to_radians and to_degrees lints

fixes #7651

I fixed the original problem as described in the issue, but the bug remains for complex expressions (the commented out TC I added is an example). I would also love some feedback on how to cleanup my code and reduce duplication. I hope it's not a problem that the issue has been claimed by someone else - that was over two months ago.

changelog: ``[`suboptimal_flops`]`` no longer proposes broken code with `to_radians` and `to_degrees`
2021-12-28 17:11:40 +00:00
BB
d5c4119d42 Fixed issues with to_radians and to_degrees lints 2021-12-28 17:49:18 +01:00
Alex Ozdemir
ee6d5c5cda contants peel_refs to catch x << &0 2021-12-28 08:32:55 -08:00
Alex Ozdemir
bc0579f5bf test 2021-12-28 08:19:58 -08:00
Guillaume Gomez
dfd32544fa Update pulldown-cmark version in clippy 2021-12-28 16:19:23 +01:00
bors
56ccd30a27 Auto merge of #8127 - dswij:8090, r=xFrednet
Fix `enum_variants` FP on prefixes that are not camel-case

closes #8090

Fix FP on `enum_variants` when prefixes are only a substring of a camel-case word. Also adds some util helpers on `str_utils` to help parsing camel-case strings.

This changes how the lint behaves:

1. previously if the Prefix is only a length of 1, it's going to get ignored, i.e. these were previously ignored and now is warned
```rust
enum Foo {
    cFoo,
    cBar,
    cBaz,
}

enum Something {
    CCall,
    CCreate,
    CCryogenize,
}
```

2. non-ascii characters that doesn't have casing will not be split,
```rust
enum NonCaps {
    PrefixXXX,
    PrefixTea,
    PrefixCake,
}
```
will be considered as `PrefixXXX`, `Prefix`, `Prefix`, so this won't lint as opposed to fired previously.

changelog: [`enum_variant_names`] Fix FP when first prefix are only a substring of a camel-case word.

---

 (Edited by `@xFrednet` removed some non ascii characters)
2021-12-28 12:01:21 +00:00
bors
fc72e910fb needless_return suggest return unit type on void returns
closes #8177

previously, `needless_return` suggests an empty block `{}` to replace void `return` on match arms, this PR improve the suggestion by suggesting a unit instead.

changelog: `needless_return` suggests `()` instead of `{}` on match arms
2021-12-28 11:15:53 +00:00
Alex Ozdemir
ba70842c62 Limit the identity_op lint to integral operands.
If operands are being applied to non-integers, then the lint is likely
wrong.
2021-12-27 16:06:27 -08:00
bors
adba132411 Auto merge of #8170 - rust-lang:numbered-fields, r=xFrednet
new lint: `init-numbered-fields`

This fixes #7985.

r? `@xFrednet`

---

changelog: new lint: [`init_numbered_fields`]
2021-12-27 21:02:15 +00:00
Andre Bogus
3ebd2bc2e4 new lint: init-numbered-fields 2021-12-26 16:19:22 +01:00
bors
bb7b6beca3 Auto merge of #8133 - surechen:fix_8128, r=xFrednet
Fix 8128

Fixes #8128

changelog: Fix  error suggestion of `skip(..).next()` for immutable variable.
2021-12-26 14:05:35 +00:00
surechen
4ffd66074a Fixes #8128
changelog: Fix error suggestion of skip(..).next() for immutable variable.
2021-12-26 21:37:57 +08:00
dswij
b82c9ce3af 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.
2021-12-25 21:55:20 +08:00
dswij
6f7e5cbe21 Some minor cleanup 2021-12-25 21:55:20 +08:00
dswij
c8f016f921 Fix reversed suggestion on postfix 2021-12-25 21:55:20 +08:00
dswij
d58fdfbf3c Fix False Positive on enum_variants when prefixes are not camel-case 2021-12-25 21:54:35 +08:00
dswij
f327f0e2b6 Refactor enum_variants 2021-12-25 21:54:35 +08:00