Skip to content
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

Rollup of 9 pull requests #101246

Closed
wants to merge 188 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
171d082
Compare where predicates to trait bounds.
aldhsu Jul 12, 2022
b96842d
Split unfixable lints.
aldhsu Jul 13, 2022
3ddc04f
Add extra test cases from #8771, #8757, #9076.
aldhsu Jul 13, 2022
b426bd5
Don't lint `transmute_undefined_repr` when the the first field of a `…
Jarcho Aug 3, 2022
80f0f28
Extend `if_then_some_else_none` to also suggest `bool::then_some`
mkrasnitski Aug 4, 2022
99e77d0
Allow type erasure using `*const/mut int_type` in `transmute_undefine…
Jarcho Aug 7, 2022
73cd954
Add iter_once and iter_empty lints
sgued Jul 16, 2022
332e031
Fix the lint in clippy itself
sgued Jul 16, 2022
f3f86d8
Move iter_once and iter_empty to methods as a late pass
sgued Jul 16, 2022
f30d7c2
Improve suggestions
sgued Jul 19, 2022
b247594
Prevent some false positives
sgued Jul 28, 2022
af4885c
Rename new lints to iter_on_empty_collections and iter_on_single_items
sgued Jul 30, 2022
9ffddf5
Add new lint [`positional_named_format_parameters`]
miam-miam Jun 23, 2022
cf3f71d
Do not consider method call receiver as an argument in AST.
cjgillot Aug 7, 2022
6a73a45
Fix if_let_mutex not checking Mutexes behind refs
lukaslueg Aug 10, 2022
0428f0d
Add labels to if_let_mutex
lukaslueg Aug 10, 2022
eb68895
Simplify `rustc_ast::visit::Visitor::visit_poly_trait_ref`.
nnethercote Aug 11, 2022
459821b
fix
tamaroning Jul 2, 2022
45084ee
give up when gurad has side effects
tamaroning Aug 11, 2022
dc29cfb
Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup
flip1995 Aug 11, 2022
4d8b6d4
Rollup merge of #100392 - nnethercote:simplify-visitors, r=cjgillot
matthiaskrgr Aug 11, 2022
9ac237d
Auto merge of #100419 - flip1995:clippyup, r=Manishearth
bors Aug 12, 2022
f7f60b8
Adjust lint description for better clarity
mkrasnitski Aug 12, 2022
8bae517
Lint trait duplication in one pass.
Aug 12, 2022
3c4aec5
Update clippy for introduction of Node::ExprField
ehuss Jul 31, 2022
05fc1c7
Auto merge of #9289 - mkrasnitski:9094, r=xFrednet
bors Aug 12, 2022
1a3192a
Adjust cfgs
Mark-Simulacrum Aug 9, 2022
35486cb
Update Changelog to 1.63
flip1995 Aug 8, 2022
dfa780e
Auto merge of #9324 - flip1995:changelog, r=xFrednet
bors Aug 12, 2022
f18cd27
Update lint versions for 1.63 release
flip1995 Aug 12, 2022
4d5d191
Auto merge of #9326 - flip1995:version-update, r=xFrednet
bors Aug 13, 2022
84df61c
Auto merge of #9167 - aldhsu:fix-trait-duplication-false-pos, r=flip1995
bors Aug 14, 2022
679fa9f
Auto merge of #9187 - sgued:iter-once, r=flip1995
bors Aug 14, 2022
80826c3
Implement clippy::manual_empty_string_creations lint
Guilherme-Vasconcelos Jul 18, 2022
1bf8841
Update all tests to comply with clippy::manual_empty_string_creations
Guilherme-Vasconcelos Aug 5, 2022
1a2aaf6
Skip `unnecessary_to_owned` when `t != t.to_string()`
xphoniex Aug 14, 2022
86a0a18
Auto merge of #96745 - ehuss:even-more-attribute-validation, r=cjgillot
bors Aug 15, 2022
8c9040c
Auto merge of #9329 - xphoniex:fix-#9317, r=flip1995
bors Aug 15, 2022
6de4bdf
Fix label not starting with lcase-letter
lukaslueg Aug 15, 2022
7727c30
Simplify the borrow_deref_ref lint example
stanislav-tkach Aug 13, 2022
0fc95e8
Auto merge of #9318 - lukaslueg:ifletmutexref, r=xFrednet
bors Aug 15, 2022
a427b12
Auto merge of #9328 - stanislav-tkach:borrow_deref_ref-remove-extra-d…
bors Aug 16, 2022
6e5f90a
Shrink `ast::Attribute`.
nnethercote Aug 11, 2022
e92183c
Rename some things related to literals.
nnethercote Aug 1, 2022
9e9b3dd
Fix example
alex-semenyuk Aug 16, 2022
86ac6e8
Auto merge of #9040 - miam-miam100:unused_named_parameter, r=dswij
bors Aug 16, 2022
048e4d0
Auto merge of #9340 - alex-semenyuk:box_t, r=dswij
bors Aug 16, 2022
c1e0435
unwrap_used and expect_used: trigger on uses of their _err variants
sgued Aug 15, 2022
bd121ef
Fix [`non_ascii_literal`] in tests
Serial-ATA Aug 13, 2022
bfeaae8
suggest map_or in case_sensitive_file_extension_comparisons
Aug 16, 2022
f4f5bb4
Auto merge of #9327 - Serial-ATA:non_ascii_literal_macro, r=Alexendoo
bors Aug 16, 2022
343476d
Use `CARGO_TARGET_DIR` in compile-test
Serial-ATA Aug 16, 2022
a331766
Auto merge of #9343 - Serial-ATA:compiletest-target-env, r=Manishearth
bors Aug 16, 2022
a05cb74
Enhance `needless_borrow` to consider trait implementations
smoelius Jul 8, 2022
032f112
Fix adjacent code
smoelius Jul 8, 2022
18c6818
Auto merge of #9341 - bmc-msft:suggest-map_or-instead-of-unwrap_or, r…
bors Aug 17, 2022
48cb816
Handle `CARGO_TARGET_DIR` not being set in compile-test
Jarcho Aug 17, 2022
aadd014
Fix typo in as_undescore docs
cherryblossom000 Aug 17, 2022
4235b64
Auto merge of #9344 - Jarcho:opt_target_dir, r=flip1995
bors Aug 17, 2022
dc497c8
Auto merge of #9345 - cherryblossom000:patch-1, r=flip1995
bors Aug 17, 2022
37eeed7
Rollup merge of #100018 - nnethercote:clean-up-LitKind, r=petrochenkov
matthiaskrgr Aug 17, 2022
84fb7e0
Auto merge of #9287 - Jarcho:trans_undefined, r=xFrednet
bors Aug 17, 2022
ab91d5a
unwrap_used: Fix error message for unwrap_err when expect_used is all…
sgued Aug 17, 2022
849c1c0
Auto merge of #9338 - sgued:9331-unwrap-err-used, r=giraffate
bors Aug 17, 2022
c419d0a
Auto merge of #9136 - smoelius:enhance-needless-borrow, r=Jarcho
bors Aug 18, 2022
e87a5a1
Dont lint on match pattern-binding
lukaslueg Aug 18, 2022
eeaaba3
Auto merge of #9348 - lukaslueg:issue9347, r=Alexendoo
bors Aug 18, 2022
868dba9
Auto merge of #9295 - Guilherme-Vasconcelos:manual-empty-string-creat…
bors Aug 19, 2022
2666c38
Add [`unused_peekable`] lint
Serial-ATA Jul 29, 2022
0efafa4
Better handle method/function calls
Serial-ATA Aug 5, 2022
8ab2f88
Move `AsUnderscore` into `Casts` lint pass
Jarcho Jun 5, 2022
21f5954
Move `BorrowAsPtr` into `Casts` lint pass
Jarcho Jun 5, 2022
2502898
Move `ByteCount` into `Methods` lint pass
Jarcho Jun 5, 2022
ba6a459
Move `BytesCountToLen` into `Methods` lint pass
Jarcho Jun 5, 2022
e3b7797
Move `CaseSensitiveFileExtensionComparisons` into `Methods` lint pass
Jarcho Jun 5, 2022
a8d80d5
Move `GetFirst` into `Methods` lint pass
Jarcho Jun 5, 2022
5bc8813
Move `ManualOkOr` into `Methods` lint pass
Jarcho Jun 5, 2022
4523954
Move `MapClone` into `Methods` lint pass
Jarcho Jun 5, 2022
2f0ed0a
Move `MapErrIgnore` into `Methods` lint pass
Jarcho Jun 5, 2022
508cf6b
Move `MutMutexLock` into `Methods` lint pass
Jarcho Jun 5, 2022
0cc01ce
Move `OpenOptions` into `Methods` lint pass
Jarcho Jun 6, 2022
226f135
Move `PathBufPushOverwrite` into `Methods` lint group
Jarcho Jun 6, 2022
fd53761
Move `range_zip_with_len` into `Methods` lint pass
Jarcho Jun 6, 2022
06d752e
Move `RepeatOnce` into `Methods` lint pass
Jarcho Jun 6, 2022
e834855
Move `StableSortPrimitive` to `Methods` lint pass
Jarcho Jun 6, 2022
e213b6e
Move `TransmutingNull` into `Transmute` lint pass
Jarcho Jun 6, 2022
bb0584d
Move `UnitHash` into `Methods` lint pass
Jarcho Jun 6, 2022
d8d4a13
Move `UnnecessarySortBy` into `Methods` lint pass
Jarcho Jun 6, 2022
8acc4d2
Move `VecResizeToZero` into `Methods` lint pass
Jarcho Jun 6, 2022
d8808db
Move `VerboseFileReads` into `Methods` lint pass
Jarcho Jun 6, 2022
477c16d
Auto merge of #8957 - Jarcho:more_pass_merges, r=flip1995
bors Aug 19, 2022
4f049f5
Refactor `FormatArgsExpn`
Alexendoo Aug 18, 2022
d95b675
Rework `only_used_in_recursion`
Jarcho May 8, 2022
39f4bee
Move `only_used_in_recursion` back into `complexity`
Jarcho May 16, 2022
3e594de
Auto merge of #9349 - Alexendoo:format-args-expn, r=flip1995
bors Aug 19, 2022
3a54117
Auto merge of #8804 - Jarcho:in_recursion, r=Alexendoo
bors Aug 19, 2022
a4413f7
Register new lint collapsible_str_replace to methods
nahuakang Aug 2, 2022
89698b9
Extend and improve initial test cases for collapsible_str_replace
nahuakang Aug 4, 2022
6e86687
Handle replace calls with char slices
nahuakang Aug 5, 2022
a9bd0bd
Handle repeated str::replace calls with single char kind to str
nahuakang Aug 7, 2022
c989746
Remove checks on char slice; improve lint suggestion
nahuakang Aug 8, 2022
fb30b64
Adjust test cases; run cargo dev bless
nahuakang Aug 8, 2022
2091142
Auto merge of #9258 - Serial-ATA:unused-peekable, r=Alexendoo
bors Aug 19, 2022
2781ad0
Fix typos
alex-semenyuk Aug 20, 2022
b070b40
Simplify lint logic and address code review comments
nahuakang Aug 14, 2022
0dfec01
Auto merge of #9355 - alex-semenyuk:fixed_typos, r=giraffate
bors Aug 20, 2022
5820add
Auto merge of #9269 - nahuakang:collapsible_str_replace, r=flip1995
bors Aug 20, 2022
6f3d398
Add test for #8855
smoelius May 20, 2022
41309df
Auto merge of #8857 - smoelius:fix-8855, r=flip1995
bors Aug 20, 2022
bafa89b
Suggest moving redundant generic args of an assoc fn to its trait
hkmatsumoto Aug 21, 2022
5d403c0
allow check for `match` in lint [`option_if_let_else`]
J-ZhengLi Apr 16, 2022
ffe7125
and check for `Result`
J-ZhengLi Apr 16, 2022
f7a376e
Update needless_match.stderr
tamaroning Aug 21, 2022
1f75845
Reduce indentation and add comment about lint name
flip1995 Aug 21, 2022
87b3afc
Auto merge of #8696 - J-ZhengLi:issue8492, r=flip1995
bors Aug 21, 2022
5048af7
feat(fix): Do not lint if the target code is inside a loop
kyoto7250 Jun 13, 2022
318ed05
Reduce code duplication
flip1995 Aug 21, 2022
070b035
Improve error if rustfix coverage test spuriously fails
flip1995 Aug 21, 2022
e19a05c
Auto merge of #8992 - kyoto7250:fix_8753, r=flip1995
bors Aug 21, 2022
cc637ba
Auto merge of #9092 - tamaroning:fix-needless-match, r=llogiq
bors Aug 21, 2022
687fcf1
Fix `to_string_in_format_args` false positive
smoelius Jul 29, 2022
0bc26c8
`needed_ref` -> `needs_ref`
smoelius Jul 29, 2022
5735a3b
Auto merge of #9259 - smoelius:fix-9256, r=llogiq
bors Aug 22, 2022
06d7119
Remove the symbol from `ast::LitKind::Err`.
nnethercote Aug 22, 2022
2cb5318
Rename `manual_empty_string_creation` and move to pedantic
Alexendoo Aug 23, 2022
b33002d
Auto merge of #9366 - Alexendoo:manual_string_new, r=xFrednet
bors Aug 23, 2022
345c42a
Stabilize `#![feature(label_break_value)]`
jyn514 Jul 14, 2022
a0afbdf
Replace `contains_ty(..)` with `Ty::contains(..)`
Aug 24, 2022
79a439a
Auto merge of #9370 - mikerite:20220824_ty_contains, r=Jarcho
bors Aug 24, 2022
2cdc54d
Rollup merge of #99332 - jyn514:stabilize-label-break-value, r=petroc…
JohnTitor Aug 24, 2022
61aa4ef
uninit_vec: Vec::spare_capacity_mut is stable
sk1p Aug 25, 2022
fb7dffe
add `multi_assignments` lint
roynrishingha Aug 26, 2022
21f103a
Auto merge of #9379 - royrustdev:multi_assignments, r=llogiq
bors Aug 26, 2022
602bec2
Auto merge of #9374 - sk1p:patch-1, r=Jarcho
bors Aug 26, 2022
fe93b8d
Don't lint `needless_return` if `return` has attrs
lukaslueg Aug 26, 2022
de028e2
Implemented suspicious_to_owned lint to check if `to_owned` is called…
xanathar Jun 10, 2022
be8bd60
Auto merge of #9381 - lukaslueg:issue9361, r=dswij
bors Aug 27, 2022
90fe3be
remove parenthesis from unnecessary_cast suggestion
llogiq Aug 27, 2022
51e9113
Add `span_contains_comments` util
dswij Aug 1, 2022
b07d72b
Ignore when there is comment
dswij Aug 27, 2022
2d4d8e1
Auto merge of #8984 - xanathar:pr/suspicious_to_owned, r=llogiq
bors Aug 27, 2022
9678751
pretty printing give proper erro message without panic
chenyukang Aug 22, 2022
722d136
Use hir::Map to prevent false positives
hkmatsumoto Aug 28, 2022
8d9da4d
Auto merge of #9276 - dswij:9164, r=flip1995
bors Aug 28, 2022
75ed56f
Make CI pass
hkmatsumoto Aug 28, 2022
1529137
Support method calls
hkmatsumoto Aug 28, 2022
c542f1f
Don't lint literal None from expansion
lukaslueg Aug 28, 2022
3ad398d
Merge branch 'master' into rustup
Jarcho Aug 28, 2022
278b092
Bump nightly version -> 2022-08-27
Jarcho Aug 28, 2022
9790a32
Fixes for latest nightly
Jarcho Aug 28, 2022
4e31c8c
Auto merge of #9389 - lukaslueg:penmacro, r=llogiq
bors Aug 28, 2022
e550739
Disable incremental compilation on CI
Jarcho Aug 28, 2022
28ec27b
Auto merge of #9388 - Jarcho:rustup, r=Jarcho
bors Aug 29, 2022
58bbb1a
Auto merge of #9385 - rust-lang:unnecessary-cast-remove-parens, r=Ale…
bors Aug 29, 2022
26a6891
Fix missing parens in `suboptimal_flops` sugg
lukaslueg Aug 29, 2022
c5a8230
Fix `suspicious_to_owned` test when `c_char` is `u8`
Alexendoo Aug 29, 2022
30979bf
Add lint `cast_slice_from_raw_parts`
clubby789 Jul 26, 2022
cc9f203
Update clippy_lints/src/casts/mod.rs
clubby789 Aug 29, 2022
e9f7ce1
Auto merge of #9247 - clubby789:raw_slice_pointer_cast, r=Alexendoo
bors Aug 29, 2022
e1ecdb6
Auto merge of #9395 - Alexendoo:suspicious-to-owned-test, r=Manishearth
bors Aug 29, 2022
9ffc5a5
Fix more parens for `suboptimal_flops` suggs
lukaslueg Aug 29, 2022
4df6032
Auto merge of #9394 - lukaslueg:issue9391, r=Jarcho
bors Aug 30, 2022
77eb1ae
add UI test for unpretty
chenyukang Aug 30, 2022
19ef04f
Fix the order of `trait_duplication_in_bounds`
Jarcho Aug 30, 2022
66a9705
Initial implementation of `result_large_err`
lukaslueg Aug 24, 2022
09e4659
Auto merge of #9373 - lukaslueg:result_large_err, r=Alexendoo
bors Aug 30, 2022
3f66efd
Fix uintended diagnostic caused by `drain(..)`
Aug 29, 2022
f51aade
Auto merge of #9397 - Jarcho:trait_dup_order, r=dswij
bors Aug 31, 2022
e10ab62
Link “? operator” to relevant chapter in The Book
mgeisler Aug 31, 2022
4a33bf3
Simplify MIR opt tests
JakobDegen Aug 21, 2022
b8075e4
migrate rustc_query_system to use SessionDiagnostic
evopen Aug 21, 2022
d7e07c0
link related issue to FIXME
evopen Aug 22, 2022
ac638c1
use derive proc macro to impl SessionDiagnostic
evopen Aug 23, 2022
166aef9
delete leftover comment
evopen Aug 25, 2022
7ce59eb
SessionDiagnostic for QueryOverflow error
evopen Aug 27, 2022
11fc785
lint: avoid linting diag functions with diag lints
davidtwco Aug 31, 2022
9a67767
Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup
Jarcho Aug 31, 2022
cacc7bf
Fix a typo on `wasm64-unknown-unknown` doc
JohnTitor Aug 31, 2022
7ed1333
Use `CountIsStart` in clippy
Jarcho Aug 31, 2022
fa49d58
Rollup merge of #100787 - chenyukang:fix-100770-pretty-crash, r=petro…
matthiaskrgr Aug 31, 2022
62b35a7
Rollup merge of #100827 - JakobDegen:better-tests, r=wesleywiser
matthiaskrgr Aug 31, 2022
2d7644a
Rollup merge of #100838 - hkmatsumoto:move-gen-args-to-trait-when-app…
matthiaskrgr Aug 31, 2022
c8fede9
Rollup merge of #100844 - evopen:migrate-diag, r=davidtwco
matthiaskrgr Aug 31, 2022
3af942d
Rollup merge of #101140 - Jarcho:clippyup, r=Jarcho
matthiaskrgr Aug 31, 2022
579c050
Rollup merge of #101161 - ldm0:ldm_fix_diagnostic, r=cjgillot
matthiaskrgr Aug 31, 2022
99154f5
Rollup merge of #101229 - mgeisler:link-try-operator, r=thomcc
matthiaskrgr Aug 31, 2022
2e0b1d8
Rollup merge of #101230 - davidtwco:translation-internal-lint-no-self…
matthiaskrgr Aug 31, 2022
d78ae31
Rollup merge of #101240 - JohnTitor:JohnTitor-patch-1, r=ehuss
matthiaskrgr Aug 31, 2022
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
Handle CARGO_TARGET_DIR not being set in compile-test
  • Loading branch information
Jarcho committed Aug 17, 2022
commit 48cb816530e020f568b0b578c22a791ee85f2868
8 changes: 6 additions & 2 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,12 @@ const RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS: &[&str] = &[
];

fn check_rustfix_coverage() {
let target_dir = PathBuf::from(std::env::var("CARGO_TARGET_DIR").unwrap());
let missing_coverage_path = target_dir.join("debug/test/ui/rustfix_missing_coverage.txt");
let missing_coverage_path = Path::new("debug/test/ui/rustfix_missing_coverage.txt");
let missing_coverage_path = if let Ok(target_dir) = std::env::var("CARGO_TARGET_DIR") {
PathBuf::from(target_dir).join(missing_coverage_path)
} else {
missing_coverage_path.to_path_buf()
};

if let Ok(missing_coverage_contents) = std::fs::read_to_string(missing_coverage_path) {
assert!(RUSTFIX_COVERAGE_KNOWN_EXCEPTIONS.iter().is_sorted_by_key(Path::new));
Expand Down