]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoAuto merge of #7873 - xFrednet:7869-string-index-ice, r=Manishearth
bors [Mon, 25 Oct 2021 19:20:05 +0000 (19:20 +0000)]
Auto merge of #7873 - xFrednet:7869-string-index-ice, r=Manishearth

Update `str` utils to prevent ICEs and FNs

This PR reworks some string handling for lints regarding enum naming. I hope the refactoring will prevent future ICEs and help with new bug free implementations.

It might be better to review this PR by going through the commits, as `clippy_utils::camel_case` was renamed to `clippy_utils::str_utils` and then changed further. GH sadly doesn't really make the changes that obvious :upside_down_face:

Not too much more to say. Have a nice day :sun_with_face:

---

Fixes: rust-lang/rust-clippy#7869
changelog: ICE Fix: [`enum_variant_names`] #7869

2 years agoAuto merge of #7874 - xFrednet:7756-move-lint, r=llogiq
bors [Mon, 25 Oct 2021 18:56:57 +0000 (18:56 +0000)]
Auto merge of #7874 - xFrednet:7756-move-lint, r=llogiq

Move `non_send_fields_in_send_ty` to `suspicious`

Stabilize the `non_send_fields_in_send_ty` lint and update the lint for the `allowed_scripts` configuration.

---

closes: rust-lang/rust-clippy#7756

changelog: Move `non_send_fields_in_send_ty` to `suspicious`

2 years agoMove `non_send_fields_in_send_ty` to `suspicious`
xFrednet [Sun, 24 Oct 2021 21:01:44 +0000 (23:01 +0200)]
Move `non_send_fields_in_send_ty` to `suspicious`

Also updated one configuration for nicer formatting

2 years agoAuto merge of #7855 - flip1995:changelog, r=xFrednet
bors [Mon, 25 Oct 2021 11:05:25 +0000 (11:05 +0000)]
Auto merge of #7855 - flip1995:changelog, r=xFrednet

Update CHANGELOG

r? `@xFrednet`  (you showed to be a reliable reviewer for this :) )

[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)

changelog: none

2 years agoUpdate CHANGELOG
flip1995 [Thu, 21 Oct 2021 15:37:57 +0000 (17:37 +0200)]
Update CHANGELOG

2 years agoAuto merge of #7872 - calebcartwright:sync-use-new-branch, r=flip1995
bors [Mon, 25 Oct 2021 08:46:51 +0000 (08:46 +0000)]
Auto merge of #7872 - calebcartwright:sync-use-new-branch, r=flip1995

recommend new branch or deleting branch when synching from rust

changelog: none

r? `@flip1995` - thanks again for your assistance in zulip earlier, figured I'd take a pass at incorporating your recommendation to delete or use a new branch into the excellent docs here

2 years agoRefactored some string handling to prevent ICEs and FNs
xFrednet [Sun, 24 Oct 2021 20:47:39 +0000 (22:47 +0200)]
Refactored some string handling to prevent ICEs and FNs

2 years agodocs: recommend new branch
Caleb Cartwright [Sun, 24 Oct 2021 20:14:45 +0000 (15:14 -0500)]
docs: recommend new branch

2 years agoRefactor `camel_case` util functions for new `StrIndex`
xFrednet [Sun, 24 Oct 2021 19:06:17 +0000 (21:06 +0200)]
Refactor `camel_case` util functions for new `StrIndex`

2 years agoAuto merge of #7871 - camsteffen:fmt-update, r=camsteffen
bors [Sun, 24 Oct 2021 17:55:49 +0000 (17:55 +0000)]
Auto merge of #7871 - camsteffen:fmt-update, r=camsteffen

Update rustfmt

changelog: none

Something changed with `rustup update nightly`

2 years agoUpdate rustfmt
Cameron Steffen [Sun, 24 Oct 2021 17:52:38 +0000 (12:52 -0500)]
Update rustfmt

2 years agoRename `clippy_utils::camal_case` to `clippy_utils::str_utils`
xFrednet [Sun, 24 Oct 2021 15:42:13 +0000 (17:42 +0200)]
Rename `clippy_utils::camal_case` to `clippy_utils::str_utils`

2 years agoAuto merge of #7867 - dswij:utils-typo, r=llogiq
bors [Sat, 23 Oct 2021 16:09:45 +0000 (16:09 +0000)]
Auto merge of #7867 - dswij:utils-typo, r=llogiq

Fix typo on utils/lib

Found some typo when looking through `clippy_utils/src/lib.rs` :slightly_smiling_face:

changelog: none

2 years agoFix typo on utils/lib
Dharma Saputra Wijaya [Sat, 23 Oct 2021 15:42:31 +0000 (23:42 +0800)]
Fix typo on utils/lib

2 years agoAuto merge of #7856 - Manishearth:impl-safety, r=xFrednet
bors [Thu, 21 Oct 2021 21:51:24 +0000 (21:51 +0000)]
Auto merge of #7856 - Manishearth:impl-safety, r=xFrednet

missing_safety_doc: Handle 'implementation safety' headers as well

We hit some FPs on this in `yoke`, it's somewhat normal to mark trait impl safety with "implementation safety". We could also broaden the check for headers which contain the word "safety" somehow, or split out impl safety stuff to only apply to traits.

changelog: handle 'implementation safety' headers in `missing_safety_doc`

2 years agouse a variable
Manish Goregaokar [Thu, 21 Oct 2021 21:40:33 +0000 (14:40 -0700)]
use a variable

2 years agoAuto merge of #7857 - flip1995:fix_deploy, r=xFrednet
bors [Thu, 21 Oct 2021 20:54:47 +0000 (20:54 +0000)]
Auto merge of #7857 - flip1995:fix_deploy, r=xFrednet

Fix deploy script

I broke this script in #7502, so that the stable symlink isn't generated
anymore. This reverts this change.

changelog: none

2 years agoAuto merge of #7801 - aDotInTheVoid:empty-format, r=camsteffen
bors [Thu, 21 Oct 2021 18:15:23 +0000 (18:15 +0000)]
Auto merge of #7801 - aDotInTheVoid:empty-format, r=camsteffen

Make useless_format recognize format!("")

Closes #7796

changelog: [`useless_format`] Fix for false negitive for `format!("")`

2 years agoAuto merge of #7850 - ThibsG:PossibleCastTruncation5395, r=camsteffen
bors [Thu, 21 Oct 2021 18:01:39 +0000 (18:01 +0000)]
Auto merge of #7850 - ThibsG:PossibleCastTruncation5395, r=camsteffen

Fix FP: no lint when cast is coming from `signum` method call for `cast_possible_truncation` lint

Fixes a FP when cast is coming from `signum` method call

fixes: #5395

changelog: [`cast_possible_truncation`] Fix FP when cast is coming from `signum` method call

2 years agoMake useless_format recognize format!("")
Nixon Enraght-Moony [Mon, 11 Oct 2021 00:03:11 +0000 (01:03 +0100)]
Make useless_format recognize format!("")

Closes #7796

2 years agoDo not lint when cast is coming from `signum` method call
ThibsG [Wed, 20 Oct 2021 19:44:05 +0000 (21:44 +0200)]
Do not lint when cast is coming from `signum` method call

2 years agoFix deploy script
flip1995 [Thu, 21 Oct 2021 16:00:57 +0000 (18:00 +0200)]
Fix deploy script

I broke this script in #7502, so that the stable symlink isn't generated
anymore. This reverts this change.

2 years agoHandle 'implementation safety' headers as well
Manish Goregaokar [Thu, 21 Oct 2021 15:50:50 +0000 (08:50 -0700)]
Handle 'implementation safety' headers as well

2 years agoAuto merge of #7853 - flip1995:rustup, r=flip1995
bors [Thu, 21 Oct 2021 10:23:11 +0000 (10:23 +0000)]
Auto merge of #7853 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

changelog: none

2 years agoBump nightly version -> 2021-10-21
flip1995 [Thu, 21 Oct 2021 10:19:46 +0000 (12:19 +0200)]
Bump nightly version -> 2021-10-21

2 years agoBump Clippy Version -> 0.1.58
flip1995 [Thu, 21 Oct 2021 10:19:32 +0000 (12:19 +0200)]
Bump Clippy Version -> 0.1.58

2 years agoMerge remote-tracking branch 'upstream/master' into rustup
flip1995 [Thu, 21 Oct 2021 10:18:12 +0000 (12:18 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

2 years agoAuto merge of #7852 - surechen:fix_typo, r=xFrednet
bors [Thu, 21 Oct 2021 09:08:22 +0000 (09:08 +0000)]
Auto merge of #7852 - surechen:fix_typo, r=xFrednet

Fix typo for invalid_null_ptr_usage and missing_inline_in_public_items.

Fix typo for invalid_null_ptr_usage and missing_inline_in_public_items.

changelog: none

2 years agoFix typo for INVALID_NULL_PTR_USAGE and MISSING_INLINE_IN_PUBLIC_ITEMS.
surechen [Thu, 21 Oct 2021 06:33:43 +0000 (14:33 +0800)]
Fix typo for INVALID_NULL_PTR_USAGE and MISSING_INLINE_IN_PUBLIC_ITEMS.

2 years agoAuto merge of #7838 - nhamovitz:trailing_zs_arr_wo_repr, r=Manishearth
bors [Wed, 20 Oct 2021 20:35:58 +0000 (20:35 +0000)]
Auto merge of #7838 - nhamovitz:trailing_zs_arr_wo_repr, r=Manishearth

Warn on structs with a trailing zero-sized array but no `repr` attribute

Closes #2868

changelog: Implement ``[`trailing_empty_array`]``, which warns if a struct is defined where the last field is a zero-sized array but there are no `repr` attributes. Zero-sized arrays aren't very useful in Rust itself, so such a struct is likely being created to pass to C code or in some other situation where control over memory layout matters. Either way, a `repr` attribute is needed.

2 years agoAuto merge of #7849 - ThibsG:SafetyDoc, r=llogiq
bors [Wed, 20 Oct 2021 16:46:38 +0000 (16:46 +0000)]
Auto merge of #7849 - ThibsG:SafetyDoc, r=llogiq

FIx FP in `missing_safety_doc` lint

Fix FP where lint souldn't fire if any parent has `#[doc(hidden)]` attribute

fixes: #7347

changelog: [`missing_safety_doc`] Fix FP if any parent has `#[doc(hidden)]` attribute

2 years agoDo not lint if any parent has hidden attribute
ThibsG [Thu, 14 Oct 2021 10:16:35 +0000 (12:16 +0200)]
Do not lint if any parent has hidden attribute

2 years agoAuto merge of #7848 - Veykril:patch-1, r=xFrednet
bors [Wed, 20 Oct 2021 12:02:32 +0000 (12:02 +0000)]
Auto merge of #7848 - Veykril:patch-1, r=xFrednet

Fix doc heading of `transmute_num_to_bytes`

changelog: none

2 years agoFix doc heading of TRANSMUTE_NUM_TO_BYTES
Lukas Wirth [Wed, 20 Oct 2021 11:46:12 +0000 (13:46 +0200)]
Fix doc heading of TRANSMUTE_NUM_TO_BYTES

2 years agoAuto merge of #7775 - F3real:no_effect, r=xFrednet
bors [Wed, 20 Oct 2021 09:33:45 +0000 (09:33 +0000)]
Auto merge of #7775 - F3real:no_effect, r=xFrednet

Detect underscored variables with no side effects

Fixes #7545

changelog: Lint on underscored variables with no side effects in [`no_effect`]

2 years agoAuto merge of #7840 - dswij:question-mark-result, r=llogiq
bors [Wed, 20 Oct 2021 07:27:13 +0000 (07:27 +0000)]
Auto merge of #7840 - dswij:question-mark-result, r=llogiq

Cover `Result` for `question_mark`

closes #7135

changelog: [`question_mark`] now covers `Result`

2 years agoSmall refactor on `question_mark` condition checks
dswij [Wed, 20 Oct 2021 05:41:44 +0000 (13:41 +0800)]
Small refactor on `question_mark` condition checks

2 years agoAuto merge of #7833 - Dmitry-Borodin:patch-1, r=giraffate
bors [Tue, 19 Oct 2021 23:47:20 +0000 (23:47 +0000)]
Auto merge of #7833 - Dmitry-Borodin:patch-1, r=giraffate

Add reference to another doc with explanation

Add reference to another doc that explains which repository should be passed in this command since this is not covered in the command help itself.
changelog: none

2 years agoLint on underscore variable assignment
F3real [Mon, 4 Oct 2021 21:49:53 +0000 (23:49 +0200)]
Lint on underscore variable assignment

Fix tests after no_effect update

Add a drop testcase

Don't lint _ variables in macro expansion

Address review comments and update tests

Don't shadow unnecessary operation lint if no_effect is allowed

Revert shadowing change and remove no_effect allows

Update clippy_lints/src/no_effect.rs

Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
Update clippy_lints/src/no_effect.rs

Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>
Address review comments

2 years agoRename lint
Nathaniel Hamovitz [Tue, 19 Oct 2021 21:33:43 +0000 (14:33 -0700)]
Rename lint

2 years agoremove resolved note
Nathaniel Hamovitz [Tue, 19 Oct 2021 21:23:55 +0000 (14:23 -0700)]
remove resolved note

2 years agoAuto merge of #7811 - rust-lang:eq-op-testless, r=xFrednet
bors [Tue, 19 Oct 2021 19:54:40 +0000 (19:54 +0000)]
Auto merge of #7811 - rust-lang:eq-op-testless, r=xFrednet

avoid `eq_op` in test code

Add a check to `eq_op` that will avoid linting in functions annotated with `#[test]`

---

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: avoid `eq_op` in test functions

2 years agoRollup merge of #88860 - nbdd0121:panic, r=m-ou-se
Yuki Okushi [Tue, 19 Oct 2021 19:35:14 +0000 (04:35 +0900)]
Rollup merge of #88860 - nbdd0121:panic, r=m-ou-se

Deduplicate panic_fmt

std's begin_panic_fmt and core's panic_fmt are duplicates. Merge them to declutter code and remove a lang item.

2 years agoavoid `eq_op` in test code
Andre Bogus [Tue, 12 Oct 2021 17:18:22 +0000 (19:18 +0200)]
avoid `eq_op` in test code

2 years agomade description of intellij a link by moving outside of code block.
Dmitry Borodin [Tue, 19 Oct 2021 18:33:39 +0000 (20:33 +0200)]
made description of intellij a link by moving outside of code block.

2 years agoRemove begin_panic_fmt from clippy
Gary Guo [Tue, 19 Oct 2021 12:58:58 +0000 (13:58 +0100)]
Remove begin_panic_fmt from clippy

2 years agoUpdate test for `question_mark` to cover `Result`
dswij [Tue, 19 Oct 2021 10:27:37 +0000 (18:27 +0800)]
Update test for `question_mark` to cover `Result`

2 years agoCover `Result` for `question_mark`
dswij [Tue, 19 Oct 2021 10:26:50 +0000 (18:26 +0800)]
Cover `Result` for `question_mark`

2 years agoformatting 🙃
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:42:01 +0000 (18:42 -0700)]
formatting 🙃

2 years agoUse real type in doc examples
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:32:00 +0000 (18:32 -0700)]
Use real type in doc examples

2 years agoRemove explicit lifetime
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:20:35 +0000 (18:20 -0700)]
Remove explicit lifetime

2 years agoRemove comment
Nathaniel Hamovitz [Tue, 19 Oct 2021 01:03:00 +0000 (18:03 -0700)]
Remove comment

2 years agoOne more test + final tidying
Nathaniel Hamovitz [Tue, 19 Oct 2021 00:41:27 +0000 (17:41 -0700)]
One more test + final tidying

2 years agoRevert "!: this is the commit that demonstrates the ICE"
Nathaniel Hamovitz [Tue, 19 Oct 2021 00:18:07 +0000 (17:18 -0700)]
Revert "!: this is the commit that demonstrates the ICE"

This reverts commit d85f903c91d909534003ee2ff0e16316b20687dc.

2 years ago!: this is the commit that demonstrates the ICE
Nathaniel Hamovitz [Tue, 19 Oct 2021 00:07:51 +0000 (17:07 -0700)]
!: this is the commit that demonstrates the ICE

2 years agoDon't need `rustc_attr` anymore
Nathaniel Hamovitz [Mon, 18 Oct 2021 23:53:17 +0000 (16:53 -0700)]
Don't need `rustc_attr` anymore

2 years agoImprove help message
Nathaniel Hamovitz [Mon, 18 Oct 2021 23:53:05 +0000 (16:53 -0700)]
Improve help message

2 years agoAll five `has_repr_attr` agree + are correct
Nathaniel Hamovitz [Mon, 18 Oct 2021 22:33:11 +0000 (15:33 -0700)]
All five `has_repr_attr` agree + are correct

2 years agoExploring emitting other sorts of `span`s
Nathaniel Hamovitz [Mon, 18 Oct 2021 14:02:00 +0000 (07:02 -0700)]
Exploring emitting other sorts of `span`s

2 years agoBetter testcase names
Nathaniel Hamovitz [Mon, 18 Oct 2021 11:59:03 +0000 (04:59 -0700)]
Better testcase names

2 years agoOne more test
Nathaniel Hamovitz [Mon, 18 Oct 2021 11:22:43 +0000 (04:22 -0700)]
One more test

2 years agoStill renaming lmao
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:56:49 +0000 (03:56 -0700)]
Still renaming lmao

2 years agoImprove doc and span messages
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:52:57 +0000 (03:52 -0700)]
Improve doc and span messages

2 years agoRename stderr
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:52:37 +0000 (03:52 -0700)]
Rename stderr

2 years agoRename lint
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:45:08 +0000 (03:45 -0700)]
Rename lint

2 years agorun rustfmt
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:16:10 +0000 (03:16 -0700)]
run rustfmt

2 years agoTidy import + update expected stderr
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:13:48 +0000 (03:13 -0700)]
Tidy import + update expected stderr

2 years agoTidy imports
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:04:50 +0000 (03:04 -0700)]
Tidy imports

2 years agoCheck for tuple structs
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:03:48 +0000 (03:03 -0700)]
Check for tuple structs

2 years agoRefactor ZS array detection again and this one seems great 👍
Nathaniel Hamovitz [Mon, 18 Oct 2021 07:51:30 +0000 (00:51 -0700)]
Refactor ZS array detection again and this one seems great 👍

2 years agoupdate testsuite and expand `if_chain`
Nathaniel Hamovitz [Mon, 18 Oct 2021 00:28:45 +0000 (17:28 -0700)]
update testsuite and expand `if_chain`

2 years agoTidy comments + tests; revert 'size-is-zero' detection
Nathaniel Hamovitz [Sun, 17 Oct 2021 05:03:08 +0000 (22:03 -0700)]
Tidy comments + tests; revert 'size-is-zero' detection

2 years agotried to simplify but it doesn't work :/
Nathaniel Hamovitz [Sun, 17 Oct 2021 00:49:13 +0000 (17:49 -0700)]
tried to simplify but it doesn't work :/

2 years agointermediate step
Nathaniel Hamovitz [Sat, 16 Oct 2021 23:13:14 +0000 (16:13 -0700)]
intermediate step

2 years agoadd multiple `get_attrs` and `includes_repr` and they all work!
Nathaniel Hamovitz [Sat, 16 Oct 2021 22:26:10 +0000 (15:26 -0700)]
add multiple `get_attrs` and `includes_repr` and they all work!

2 years agoRan `dev bless`!
Nathaniel Hamovitz [Sat, 16 Oct 2021 09:26:08 +0000 (02:26 -0700)]
Ran `dev bless`!

2 years agooutput looks fantastic
Nathaniel Hamovitz [Sat, 16 Oct 2021 09:01:17 +0000 (02:01 -0700)]
output looks fantastic

2 years agoit works i think (incl some `dbg`s)
Nathaniel Hamovitz [Sat, 16 Oct 2021 07:51:09 +0000 (00:51 -0700)]
it works i think (incl some `dbg`s)

2 years agoImplement getting an array of attributes!
Nathaniel Hamovitz [Sat, 16 Oct 2021 06:44:39 +0000 (23:44 -0700)]
Implement getting an array of attributes!

2 years agoImplement detecting trailing zero-sized array
Nathaniel Hamovitz [Fri, 15 Oct 2021 23:16:27 +0000 (16:16 -0700)]
Implement detecting trailing zero-sized array

2 years agoayy it compiles! ship it, right? 😎 /s
Nathaniel Hamovitz [Fri, 15 Oct 2021 08:31:26 +0000 (01:31 -0700)]
ayy it compiles! ship it, right? 😎 /s

why was `rustc_lint_defs` not already externed in `lib.rs`?
and how was r-a able to find it but cargo wasn't? 🤔

2 years agoWell it builds
Nathaniel Hamovitz [Fri, 15 Oct 2021 07:13:42 +0000 (00:13 -0700)]
Well it builds

2 years agoAdd boilerplate and basic tests
Nathaniel Hamovitz [Fri, 15 Oct 2021 03:08:38 +0000 (20:08 -0700)]
Add boilerplate and basic tests

2 years agoAuto merge of #7835 - mikerite:unneeded-allow-20211018, r=xFrednet
bors [Mon, 18 Oct 2021 07:25:12 +0000 (07:25 +0000)]
Auto merge of #7835 - mikerite:unneeded-allow-20211018, r=xFrednet

Remove unneeded allow

Remove unneeded allow

changelog: none

2 years agoRemove unneeded allow
Michael Wright [Mon, 18 Oct 2021 06:46:11 +0000 (08:46 +0200)]
Remove unneeded allow

2 years agoRollup merge of #89990 - petrochenkov:idempty, r=wesleywiser
Matthias Krüger [Mon, 18 Oct 2021 06:13:30 +0000 (08:13 +0200)]
Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser

rustc_span: `Ident::invalid` -> `Ident::empty`

The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s as well.

2 years agoAuto merge of #7832 - narpfel:implicit-saturating-sub-false-positive-else, r=giraffate
bors [Mon, 18 Oct 2021 00:22:48 +0000 (00:22 +0000)]
Auto merge of #7832 - narpfel:implicit-saturating-sub-false-positive-else, r=giraffate

Fix false positive of `implicit_saturating_sub` with `else` clause

Fixes #7831

changelog: Fix false positive of [`implicit_saturating_sub`] with `else` clause

2 years agorustc_span: `Ident::invalid` -> `Ident::empty`
Vadim Petrochenkov [Sun, 17 Oct 2021 20:20:30 +0000 (23:20 +0300)]
rustc_span: `Ident::invalid` -> `Ident::empty`

The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s.

2 years agoAdd reference to another doc with explanation
Dmitry Borodin [Sun, 17 Oct 2021 16:59:36 +0000 (18:59 +0200)]
Add reference to another doc with explanation

Add reference to another doc that explains which repository should be passed in this command since this is not covered in the command help itself.

2 years agoRollup merge of #89963 - r00ster91:parenthesisparentheses, r=nagisa
Matthias Krüger [Sun, 17 Oct 2021 16:18:59 +0000 (18:18 +0200)]
Rollup merge of #89963 - r00ster91:parenthesisparentheses, r=nagisa

Some "parenthesis" and "parentheses" fixes

"Parenthesis" is the singular (e.g. one `(` or one `)`) and "parentheses" is the plural (multiple `(` or `)`s) and this is not hard to mix up so here are some fixes for that.

Inspired by #89958

2 years agoFix false positive of `implicit_saturating_sub` with `else` clause
Paul Gey [Sun, 17 Oct 2021 13:56:59 +0000 (15:56 +0200)]
Fix false positive of `implicit_saturating_sub` with `else` clause

Fixes #7831

2 years agoSome "parenthesis" and "parentheses" fixes
r00ster91 [Sun, 17 Oct 2021 10:04:01 +0000 (12:04 +0200)]
Some "parenthesis" and "parentheses" fixes

2 years agoAuto merge of #7827 - zvavybir:master, r=xFrednet
bors [Sat, 16 Oct 2021 19:07:37 +0000 (19:07 +0000)]
Auto merge of #7827 - zvavybir:master, r=xFrednet

Fixed naive doc formatting for `#[must_use]` lints

The documentation of a few lints around the `#[must_use]` attribute had a few times "[`#[must_use]`]" (without the parentheses, but with the `[]`) and once the "`" was missing.

changelog: Fixed naive doc formatting for `#[must_use]` lints ([`must_use_unit`], [`double_must_use`], [`must_use_candidate`], [`let_underscore_must_use`])

2 years agoFixed naive doc formatting for `#[must_use]` lints
Matthias Kaak [Sat, 16 Oct 2021 15:23:34 +0000 (15:23 +0000)]
Fixed naive doc formatting for `#[must_use]` lints

2 years agoAuto merge of #7743 - smoelius:master, r=camsteffen
bors [Fri, 15 Oct 2021 17:05:13 +0000 (17:05 +0000)]
Auto merge of #7743 - smoelius:master, r=camsteffen

Add `format_in_format_args` and `to_string_in_format_args` lints

Fixes #7667 and #7729

I put these in `perf` since that was one of `@jplatte's` suggestions, and `redundant_clone` (which I consider to be similar) lives there as well.

However, I am open to changing the category or anything else.

r? `@camsteffen`

changelog: Add `format_in_format_args` and `to_string_in_format_args` lints

2 years agoRemove redundant `to_string`s
Samuel E. Moelius III [Thu, 30 Sep 2021 11:38:03 +0000 (07:38 -0400)]
Remove redundant `to_string`s

2 years agoFix adjacent tests
Samuel E. Moelius III [Thu, 30 Sep 2021 11:40:46 +0000 (07:40 -0400)]
Fix adjacent tests

2 years agoAdd `format_in_format_args` and `to_string_in_format_args` lints
Samuel E. Moelius III [Thu, 30 Sep 2021 11:45:03 +0000 (07:45 -0400)]
Add `format_in_format_args` and `to_string_in_format_args` lints

Fixes #7667 and #7729

2 years agoAuto merge of #7823 - mikerite:match-overlapping-arm-20211015, r=xFrednet
bors [Fri, 15 Oct 2021 12:42:16 +0000 (12:42 +0000)]
Auto merge of #7823 - mikerite:match-overlapping-arm-20211015, r=xFrednet

Some small improvements to the `match_overlapping_arm` tests

changelog: none

2 years agoAuto merge of #7824 - dswij:unnecessary_sort_by, r=llogiq
bors [Fri, 15 Oct 2021 11:16:57 +0000 (11:16 +0000)]
Auto merge of #7824 - dswij:unnecessary_sort_by, r=llogiq

`unnecessary_sort_by` checks if argument implements `Ord` trait

closes #7822

changelog: [`unnecessary_sort_by`] now checks if argument implements `Ord` trait