Skip to content

Update Clippy #90564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 108 commits into from
Nov 4, 2021
Merged
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
e6e6e7d
Change `unseparated_literal_suffix` type to restriction
dswij Sep 27, 2021
449d68d
Fix clippy with for loop span change
camsteffen Oct 14, 2021
4679eb3
Move const int value code to utils
Oct 20, 2021
c4d5471
Add test for #7829
Oct 20, 2021
1ede540
Fix false positive in `match_overlapping_arm`
Oct 20, 2021
7631fc5
Merge commit '91496c2ac6abf6454c413bb23e8becf6b6dc20ea' into clippyup
flip1995 Oct 21, 2021
1e8d9fb
Handle 'implementation safety' headers as well
Manishearth Oct 21, 2021
96126e7
Fix deploy script
flip1995 Oct 21, 2021
566244a
Do not lint when cast is coming from `signum` method call
ThibsG Oct 20, 2021
081d0f8
Make useless_format recognize format!("")
aDotInTheVoid Oct 11, 2021
c97a06d
Auto merge of #7850 - ThibsG:PossibleCastTruncation5395, r=camsteffen
bors Oct 21, 2021
2ba1a6a
Auto merge of #7801 - aDotInTheVoid:empty-format, r=camsteffen
bors Oct 21, 2021
6714eff
Auto merge of #7857 - flip1995:fix_deploy, r=xFrednet
bors Oct 21, 2021
9def82d
use a variable
Manishearth Oct 21, 2021
df65291
Auto merge of #7856 - Manishearth:impl-safety, r=xFrednet
bors Oct 21, 2021
efef16f
Rollup merge of #89895 - camsteffen:for-loop-head-span, r=davidtwco
JohnTitor Oct 22, 2021
e953dff
Fix `match_str_case_mismatch` false positives
Herschel Oct 23, 2021
a5a3e61
Fix typo on utils/lib
dswij Oct 23, 2021
ba0cfc7
Auto merge of #7867 - dswij:utils-typo, r=llogiq
bors Oct 23, 2021
1b91d98
Rename `clippy_utils::camal_case` to `clippy_utils::str_utils`
xFrednet Oct 24, 2021
20fb7f2
Update rustfmt
camsteffen Oct 24, 2021
73a443d
Auto merge of #7871 - camsteffen:fmt-update, r=camsteffen
bors Oct 24, 2021
d38fddd
Refactor `camel_case` util functions for new `StrIndex`
xFrednet Oct 24, 2021
1b2c57c
docs: recommend new branch
calebcartwright Oct 24, 2021
f674e6f
Always sort suggestions before emitting them
estebank Oct 1, 2021
7517ae2
Refactored some string handling to prevent ICEs and FNs
xFrednet Oct 24, 2021
4064e97
Auto merge of #7872 - calebcartwright:sync-use-new-branch, r=flip1995
bors Oct 25, 2021
949fc44
Update CHANGELOG
flip1995 Oct 21, 2021
cc2d933
Auto merge of #7855 - flip1995:changelog, r=xFrednet
bors Oct 25, 2021
1ad04f4
Move `non_send_fields_in_send_ty` to `suspicious`
xFrednet Oct 24, 2021
4f46f42
Auto merge of #7874 - xFrednet:7756-move-lint, r=llogiq
bors Oct 25, 2021
3ef1f19
Auto merge of #7873 - xFrednet:7869-string-index-ice, r=Manishearth
bors Oct 25, 2021
cb0132d
Auto merge of #7865 - Herschel:fix-match-str-case-mismatch, r=xFrednet
bors Oct 25, 2021
999b300
new lint: string-slice
llogiq Oct 25, 2021
d0c04b4
Clean up tests/ui/rename.rs
devonhollowood Oct 26, 2021
075996e
Auto merge of #7878 - rust-lang:string-slice, r=giraffate
bors Oct 26, 2021
d4196d0
Add #7859 FP test case for `question_mark`
dswij Oct 22, 2021
a1a399d
Fix `question_mark` FP on calls
dswij Oct 22, 2021
a91ec59
Update `question_mark` expected test output
dswij Oct 22, 2021
2fd1682
Update `question_mark` test to behave better
dswij Oct 22, 2021
fb0fbad
Rename variable name in `question_mark`
dswij Oct 26, 2021
6c89c00
Further clean up tests/ui/rename.rs
devonhollowood Oct 26, 2021
e48ab44
Clean up `tests/ui/deprecated.rs`
devonhollowood Oct 26, 2021
bd778e2
Register the generated lints from `cargo dev new_lint`
Alexendoo Oct 25, 2021
dea9402
Remove hidden code lines in Clippy's lint list
xFrednet Oct 26, 2021
5733c75
Apply suggestions from code review
devonhollowood Oct 26, 2021
0d07ec1
Auto merge of #7887 - xFrednet:7172-hiding-hidden-lines-online, r=fli…
bors Oct 26, 2021
ab9a8f2
Update tests after reviewer suggestions
devonhollowood Oct 26, 2021
a48367e
Auto merge of #7884 - devonhollowood:rename-cleanup, r=xFrednet
bors Oct 26, 2021
ba2ac3e
Auto merge of #7860 - dswij:question-mark-fp, r=giraffate
bors Oct 26, 2021
73c026b
Add test case
giraffate Oct 27, 2021
444ef3e
Auto merge of #7880 - Alexendoo:newlint-add-pass, r=flip1995
bors Oct 27, 2021
36d4a4e
Add unit-hash lint
mbStavola Oct 25, 2021
962e21c
Auto merge of #7875 - mbStavola:unit-hash, r=xFrednet
bors Oct 27, 2021
e2c30f0
Ignore references to type aliases in ptr_arg
Alexendoo Oct 27, 2021
ed71add
Auto merge of #7885 - devonhollowood:deprecated-cleanup, r=llogiq
bors Oct 27, 2021
89a1156
Auto merge of #7847 - mikerite:fix-7829, r=flip1995
bors Oct 28, 2021
35bf041
Fix ICE in `undocumented_unsafe_blocks`
giraffate Oct 28, 2021
7788af9
Auto merge of #7891 - giraffate:fix_ice_for_undocumented_unsafe_block…
bors Oct 28, 2021
d8fcfd7
Move if_then_panic to pedantic
camsteffen Oct 12, 2021
022146d
Rename if_then_panic to manual_assert
camsteffen Oct 12, 2021
00821ca
Auto merge of #7810 - camsteffen:if-then-panic-pedantic, r=flip1995
bors Oct 28, 2021
dbe167d
Auto merge of #7890 - Alexendoo:ptr-arg-alias, r=camsteffen
bors Oct 29, 2021
00ea73e
avoid linting `possible_truncation` on bit-reducing operations
llogiq Oct 13, 2021
2f327aa
Disable "if_not_else" lints firing on else-ifs
ahmedkrmn Oct 29, 2021
4c70c18
Auto merge of #7895 - ahmedkrmn:master, r=Manishearth
bors Oct 29, 2021
665ff57
Remove expects from FullInt Partial{Ord,Eq}
Oct 30, 2021
c8edd9a
Remove casts from FullInt impl
Oct 30, 2021
c6dca68
Simplify FullInt Ord impl
Oct 30, 2021
4a86156
Simplify FullInt Ord impl (2)
Oct 30, 2021
e8c4046
Simplify FullInt Ord impl
Oct 30, 2021
a4ede72
update most tests to 2021 edition
llogiq Oct 23, 2021
310ecb0
Auto merge of #7899 - mikerite:fullint-20211030, r=xFrednet
bors Oct 30, 2021
892063e
Add #[must_use] to len and is_empty
jkugelman Oct 11, 2021
d634fae
Rollup merge of #89786 - jkugelman:must-use-len-and-is_empty, r=josht…
matthiaskrgr Oct 31, 2021
28c225f
Move non_ascii_literal to restriction
Alexendoo Oct 31, 2021
1085df5
Add `separated_literal_suffix` as an alternative for
dswij Sep 22, 2021
bb1cf72
Update CHANGELOG to include `separated_literal_suffix`
dswij Oct 4, 2021
7cd9bf5
Auto merge of #7866 - rust-lang:edition-2021-tests, r=Manishearth
bors Nov 1, 2021
7e5f99a
Fix manual_assert for `#![no_std]` and Rust 2021
nbdd0121 Oct 20, 2021
14e0390
Account for revisions in missing-test-files
nbdd0121 Oct 24, 2021
5edb02a
Fix #7903
smoelius Nov 1, 2021
ec456de
Small fixes for missing backticks in doc
giraffate Nov 2, 2021
08b7e87
Auto merge of #7911 - giraffate:small_fixes_for_missing_backticks, r=…
bors Nov 2, 2021
4e355eb
Auto merge of #7819 - rust-lang:avoid-linting-impossible-truncation, …
bors Nov 2, 2021
3f84010
Examine lifetimes in `OpaqueDef` bounds as well
samueltardieu Oct 30, 2021
38d8025
Auto merge of #7726 - dswij:unseparated-literal-suffix, r=flip1995
bors Nov 2, 2021
9bcf966
Add test case for `clippy::needless_lifetimes` in async context
samueltardieu Oct 30, 2021
276e895
Auto merge of #7851 - nbdd0121:master, r=flip1995
bors Nov 2, 2021
9720619
Auto merge of #7901 - samueltardieu:fix-7893, r=xFrednet,flip1995
bors Nov 2, 2021
18cc4e7
Auto merge of #7907 - Alexendoo:non-ascii-restriction, r=flip1995
bors Nov 2, 2021
db9e012
Update clippy dependencies
xFrednet Nov 2, 2021
2ebd535
Auto merge of #7906 - smoelius:master, r=camsteffen
bors Nov 2, 2021
a68c135
Use .cargo/config.toml instead of .cargo/config
samueltardieu Nov 2, 2021
b6c8168
Auto merge of #7918 - samueltardieu:use-config-toml, r=flip1995
bors Nov 2, 2021
7f8198a
Advise to put a :: prefix inside the ticks
samueltardieu Nov 2, 2021
c68af43
Auto merge of #7916 - samueltardieu:double-colon-prefix, r=xFrednet
bors Nov 2, 2021
0db8c52
Add suggestion to missing backticks error
Serial-ATA Oct 31, 2021
3732d11
Specify fixable doc tests
Serial-ATA Nov 2, 2021
4d26c5c
Auto merge of #7904 - Serial-ATA:improve-doc-suggestion, r=xFrednet
bors Nov 2, 2021
c2cbf55
Rollup merge of #90500 - xFrednet:00000-update-clippy-deps, r=flip1995
matthiaskrgr Nov 2, 2021
df9f5e4
Update diagnostics.rs
lengyijun Nov 4, 2021
150a659
Auto merge of #7926 - lengyijun:patch-1, r=giraffate
bors Nov 4, 2021
1cc21db
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Nov 4, 2021
c7f5462
Bump nightly version -> 2021-11-04
flip1995 Nov 4, 2021
e181011
Auto merge of #7929 - flip1995:rustup, r=flip1995
bors Nov 4, 2021
4d6c2cc
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
flip1995 Nov 4, 2021
4e5319b
Update Cargo.lock
flip1995 Nov 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify FullInt Ord impl
Michael Wright committed Oct 30, 2021
commit c6dca68eca75a46af31d7175486909c720c2aebc
10 changes: 5 additions & 5 deletions clippy_utils/src/consts.rs
Original file line number Diff line number Diff line change
@@ -253,11 +253,11 @@ impl PartialOrd for FullInt {
impl Ord for FullInt {
#[must_use]
fn cmp(&self, other: &Self) -> Ordering {
match (self, other) {
(&Self::S(s), &Self::S(o)) => s.cmp(&o),
(&Self::U(s), &Self::U(o)) => s.cmp(&o),
(&Self::S(s), &Self::U(o)) => Self::cmp_s_u(s, o),
(&Self::U(s), &Self::S(o)) => Self::cmp_s_u(o, s).reverse(),
match (*self, *other) {
(Self::S(s), Self::S(o)) => s.cmp(&o),
(Self::U(s), Self::U(o)) => s.cmp(&o),
(Self::S(s), Self::U(o)) => Self::cmp_s_u(s, o),
(Self::U(s), Self::S(o)) => Self::cmp_s_u(o, s).reverse(),
}
}
}