Samuel Tardieu
79c69112dc
Apply collapsible_if to Clippy itself
...
Since Clippy uses the `let_chains` feature, there are many occasions to
collapse `if` and `if let` statements.
2025-03-27 14:40:44 +01:00
Santiago Pastorino
d52ac1b6d8
Fix clippy
2025-03-06 17:58:32 -03:00
Nicholas Nethercote
91481e3bcf
Overhaul the intravisit::Map trait.
...
First of all, note that `Map` has three different relevant meanings.
- The `intravisit::Map` trait.
- The `map::Map` struct.
- The `NestedFilter::Map` associated type.
The `intravisit::Map` trait is impl'd twice.
- For `!`, where the methods are all unreachable.
- For `map::Map`, which gets HIR stuff from the `TyCtxt`.
As part of getting rid of `map::Map`, this commit changes `impl
intravisit::Map for map::Map` to `impl intravisit::Map for TyCtxt`. It's
fairly straightforward except various things are renamed, because the
existing names would no longer have made sense.
- `trait intravisit::Map` becomes `trait intravisit::HirTyCtxt`, so named
because it gets some HIR stuff from a `TyCtxt`.
- `NestedFilter::Map` assoc type becomes `NestedFilter::MaybeTyCtxt`,
because it's always `!` or `TyCtxt`.
- `Visitor::nested_visit_map` becomes `Visitor::maybe_tcx`.
I deliberately made the new trait and associated type names different to
avoid the old `type Map: Map` situation, which I found confusing. We now
have `type MaybeTyCtxt: HirTyCtxt`.
2025-02-17 13:21:35 +11:00
Philipp Krones
d58b911e01
Merge commit ' ff4a26d442' into clippy-subtree-update
2024-11-28 19:38:59 +01:00
Philipp Krones
6ced8c33c0
Merge commit ' f712eb5cdc' into clippy-subtree-update
2024-11-07 22:37:01 +01:00
Michael Goulet
efeed550c4
Remove BorrowKind glob, make names longer
2024-11-04 04:45:52 +00:00
Philipp Krones
277c4e4baf
Merge commit ' aa0d551351' into clippy-subtree-update
2024-10-03 16:32:51 +02:00
Philipp Krones
b61fcbee76
Merge commit ' 7901289135' into clippy-subtree-update
2024-09-24 11:58:04 +02:00
Philipp Krones
3bff119f63
Merge commit ' 3e5a02b13b' into clippy-subtree-update
2024-06-13 12:30:48 +02:00
Philipp Krones
4363278c73
Merge commit ' 2efebd2f0c' into clippy-subtree-update
2024-05-21 10:39:30 -07:00
Michael Goulet
e65cefcf6f
Propagate errors rather than using return_if_err
2024-05-12 12:50:18 -04:00
Michael Goulet
db193c1c9d
Make LateCtxt be a type info delegate for EUV for clippy
2024-05-12 12:11:25 -04:00
Philipp Krones
0ae4a048c6
Merge commit ' 9725c4a162' into clippy-subtree-update
2024-04-04 19:52:55 +02:00
Philipp Krones
471469d30f
Merge commit ' 98363cbf6a' into clippyup
2023-09-12 18:44:06 +02:00
Philipp Krones
b0e64a9c09
Merge commit ' 5436dba826' into clippyup
2023-07-31 23:53:53 +02:00
Philipp Krones
d6d530fd0b
Merge commit ' d9c24d1b1e' into clippyup
2023-07-17 10:22:32 +02:00
Philipp Krones
cb3ecf7b79
Merge commit ' 37f4c1725d' into clippyup
2023-07-02 14:59:02 +02:00
Vadim Petrochenkov
4f8c49e950
rustc_hir: Relax lifetime requirements on Visitor::visit_path
2022-12-01 17:04:02 +03:00
Philipp Krones
46c5a5d234
Merge commit ' f4850f7292' into clippyup
2022-11-21 20:51:52 +01:00
lcnr
059e52b96b
rustc_hir_typeck: fix clippy
2022-10-20 17:53:14 +02:00
Cameron Steffen
6819e85501
Change InferCtxtBuilder from enter to build
2022-10-07 07:10:40 -05:00
Philipp Krones
d75b25faab
Merge commit ' ac0e10aa68' into clippyup
2022-10-06 09:44:38 +02:00
lcnr
e5ce6d18df
rustc_typeck to rustc_hir_analysis
2022-09-27 10:37:23 +02:00
Takayuki Maeda
ea75178219
separate definitions and HIR owners
...
fix a ui test
use `into`
fix clippy ui test
fix a run-make-fulldeps test
implement `IntoQueryParam<DefId>` for `OwnerId`
use `OwnerId` for more queries
change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-24 23:21:19 +09:00
Camille GILLOT
7b84a97c3e
Make ExprKind::Closure a struct variant.
2022-06-12 00:16:27 +02:00
xFrednet
4587b6628d
Merge 'rust-clippy/master' into clippyup
2022-05-21 13:24:00 +02:00
Eric Holk
5ad1b35206
Update clippy to new rake_read signature
2022-05-10 14:20:34 -07:00
flip1995
7cd86aa1be
Merge commit ' 7c21f91b15' into clippyup
2022-05-05 15:12:52 +01:00
Cameron Steffen
eb80da175c
Fix Visitor::NestedFilter in Clippy
2022-01-16 16:02:36 -06:00
flip1995
ece0946d7f
Merge commit ' 23d11428de' into clippyup
2021-12-17 13:40:22 +01:00
flip1995
8fea1d94f3
Merge commit ' a5d597637d' into clippyup
2021-12-06 12:33:31 +01:00
flip1995
5cf4984872
Merge commit ' b7f3f7f608' into clippyup
2021-10-07 11:21:30 +02:00
flip1995
091ed44b50
Merge commit ' 27afd6ade4' into clippyup
2021-09-08 16:31:47 +02:00
Guillaume Gomez
5c54d04ef6
Rollup merge of #87069 - sexxi-goose:copy_ref_always, r=nikomatsakis
...
ExprUseVisitor: Treat ByValue use of Copy types as ImmBorrow
r? ```@nikomatsakis```
2021-07-16 10:08:05 +02:00
flip1995
1d084b13a5
Merge commit ' 54a20a02ec' into clippyup
2021-07-15 10:44:10 +02:00
Aman Arora
a9e9b7f9b2
ExprUseVisitor::Delegate consume only when moving
2021-07-14 02:21:08 -04:00
flip1995
6c27482115
Merge commit ' 3ae8faff4d' into clippyup
2021-06-03 08:41:37 +02:00
flip1995
f6d1f368db
Merge commit ' b40ea209e7' into clippyup
2021-04-08 17:50:13 +02:00
flip1995
9f6b5de7de
Merge commit ' 0e87918536' into clippyup
2021-03-25 19:29:11 +01:00
Roxane
7926664876
Add comments with examples and tests
2021-03-15 13:16:04 -04:00
Roxane
0ab2bcd182
Add fake_read() to clippy
2021-03-14 19:45:24 -04:00
flip1995
f64149dd04
Merge commit ' 928e72dd10' into clippyup
2021-02-25 11:25:22 +01:00