about summary refs log tree commit diff
path: root/src/tools/clippy
AgeCommit message (Collapse)AuthorLines
2023-01-23Update Clippy for ConstEvalCounterBryan Garza-0/+1
2023-01-23fix: use LocalDefId instead of HirId in trait resVincenzo Palazzo-3/+4
use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-01-21Auto merge of #106977 - michaelwoerister:unord_id_collections, r=oli-obkbors-30/+30
Use UnordMap and UnordSet for id collections (DefIdMap, LocalDefIdMap, etc) This PR changes the `rustc_data_structures::define_id_collections!` macro to use `UnordMap` and `UnordSet` instead of `FxHashMap` and `FxHashSet`. This should account for a large portion of hash-maps being used in places where they can cause trouble. The changes required are moderate but non-zero: - In some places the collections are extracted into sorted vecs. - There are a few instances where for-loops have been changed to extends. ~~Let's see what the performance impact is. With a bit more refactoring, we might be able to get rid of some of the additional sorting -- but the change set is already big enough. Unless there's a performance impact, I'd like to do further changes in subsequent PRs.~~ Performance does not seem to be negatively affected ([perf-run here](https://github.com/rust-lang/rust/pull/106977#issuecomment-1396776699)). Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). r? `@ghost`
2023-01-20Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnrbors-2/+2
Check ADT fields for copy implementations considering regions Fixes #88901 r? `@ghost`
2023-01-20fix overlapping spans for `clippy::uninlined_format_args`Lukas Markeffsky-0/+4
2023-01-19Move `unchecked_duration_subtraction` to pedanticAlex Macleod-1/+1
2023-01-19Allow for more efficient sorting when exporting Unord collections.Michael Woerister-2/+2
2023-01-19Use UnordMap instead of FxHashMap in define_id_collections!().Michael Woerister-29/+29
2023-01-19Use UnordSet instead of FxHashSet in define_id_collections!().Michael Woerister-1/+1
2023-01-17fix missing subst in clippy utilsKyle Matsuda-2/+2
2023-01-17change item_bounds query to return EarlyBinder; remove bound_item_bounds queryKyle Matsuda-1/+1
2023-01-17change usages of item_bounds query to bound_item_boundsKyle Matsuda-1/+1
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-13/+13
bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14change usages of impl_trait_ref to bound_impl_trait_refKyle Matsuda-18/+18
2023-01-13Check ADT fields for copy implementations considering regionsMichael Goulet-2/+2
2023-01-13Auto merge of #106776 - oli-obk:om_nom_nom_nom_nom, r=cjgillotbors-1/+1
Feed a bunch of queries instead of tracking fields on TyCtxt r? `@cjgillot` pulled out of https://github.com/rust-lang/rust/pull/105462
2023-01-13Auto merge of #106801 - JohnTitor:rollup-xqkraw0, r=JohnTitorbors-3/+6
Rollup of 6 pull requests Successful merges: - #106608 (Render missing generics suggestion verbosely) - #106716 ([RFC 2397] Deny incorrect locations) - #106754 (Rename `Ty::is_ty_infer` -> `Ty::is_ty_or_numeric_infer`) - #106782 (Ignore tests move in git blame) - #106785 (Make blame spans better for impl wfcheck) - #106791 (Fix ICE formatting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-13Rollup merge of #106608 - compiler-errors:missing-generics-verbose, r=estebankYuki Okushi-3/+6
Render missing generics suggestion verbosely It's a bit easier to read like this, especially ones that are appending new generics onto an existing list, like ": `, T`" which render somewhat poorly inline. Also don't suggest `dyn` as a type parameter to add, even if technically that's valid in edition 2015.
2023-01-13Auto merge of #106092 - asquared31415:start_lang_item_checks, r=davidtwcobors-1/+1
Add checks for the signature of the `start` lang item Closes #105963
2023-01-12Don't suggest dyn as parameter to addMichael Goulet-3/+6
2023-01-12Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyupPhilipp Krones-850/+1879
2023-01-12Feed the `features_query` instead of grabbing it from the session lazilyOli Scherer-1/+1
2023-01-12Update clippy for new format_args!() lang items.Mara Bos-25/+35
2023-01-12Make clippy compile.Mara Bos-0/+1
2023-01-11add checks for the signature of the lang itemasquared31415-1/+1
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-3/+3
2023-01-04get_parent and find_parentMichael Goulet-15/+14
2023-01-04rename find_parent_node to opt_parent_idMichael Goulet-1/+1
2023-01-04rename get_parent_node to parent_idMichael Goulet-21/+21
2022-12-29Auto merge of #106266 - matthiaskrgr:rollup-cxrdbzy, r=matthiaskrgrbors-364/+2558
Rollup of 9 pull requests Successful merges: - #104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params) - #105899 (`./x doc library --open` opens `std`) - #106190 (Account for multiple multiline spans with empty padding) - #106202 (Trim more paths in obligation types) - #106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing) - #106236 (docs/test: add docs and a UI test for `E0514` and `E0519`) - #106259 (Update Clippy) - #106260 (Fix index out of bounds issues in rustdoc) - #106263 (Formatter should not try to format non-Rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-29Rollup merge of #106259 - flip1995:clippyup, r=matthiaskrgrMatthias Krüger-356/+2555
Update Clippy r? `@Manishearth` I think this was the very first sync with no conflicts whatsoever. I love this time of the year :D
2022-12-29Account for multiple multiline spans with empty paddingEsteban Küber-8/+3
Instead of ``` LL | fn oom( | __^ | | _| | || LL | || ) { | ||_- LL | | } | |__^ ``` emit ``` LL | // fn oom( LL | || ) { | ||_- LL | | } | |__^ ```
2022-12-29Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyupPhilipp Krones-356/+2555
2022-12-28Rename `Rptr` to `Ref` in AST and HIRNilstrieb-28/+28
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-19Make Clippy test no longer unsoundMichael Goulet-1/+1
2022-12-17Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyupPhilipp Krones-602/+2707
2022-12-15Rollup merge of #105743 - nnethercote:SimplifiedType-cleanups, r=lcnrMatthias Krüger-1/+1
`SimplifiedType` cleanups r? `@lcnr`
2022-12-15Merge `SimplifiedTypeGen<D>` into `SimplifiedType`.Nicholas Nethercote-1/+1
`SimplifiedTypeGen<DefId>` is the only instantiation used, so we don't need the generic parameter.
2022-12-14Remove TraitRef::newOli Scherer-3/+3
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-7/+7
2022-12-13Combine projection and opaque into aliasMichael Goulet-12/+12
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-11/+11
2022-12-13ProjectionTy.item_def_id -> ProjectionTy.def_idMichael Goulet-8/+8
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-7/+7
2022-12-12Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkovbors-6/+8
Remove `token::Lit` from `ast::MetaItemLit`. Currently `ast::MetaItemLit` represents the literal kind twice. This PR removes that redundancy. Best reviewed one commit at a time. r? `@petrochenkov`
2022-12-09Remove unneeded field from `SwitchTargets`Jakob Degen-1/+0
2022-12-08Fix #10021Samuel Moelius-4/+2
2022-12-02Auto merge of #104963 - petrochenkov:noaddids2, r=cjgillotbors-48/+57
rustc_ast_lowering: Stop lowering imports into multiple items Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-02Add `StrStyle` to `ast::LitKind::ByteStr`.Nicholas Nethercote-6/+8
This is required to distinguish between cooked and raw byte string literals in an `ast::LitKind`, without referring to an adjacent `token::Lit`. It's a prerequisite for the next commit.
2022-12-01Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyupPhilipp Krones-1914/+4245