about summary refs log tree commit diff
path: root/clippy_lints/src/functions
AgeCommit message (Collapse)AuthorLines
2023-12-12Move some methods from `tcx.hir()` to `tcx`zetanumbers-1/+1
Renamings: - find -> opt_hir_node - get -> hir_node - find_by_def_id -> opt_hir_node_by_def_id - get_by_def_id -> hir_node_by_def_id Fix rebase changes using removed methods Use `tcx.hir_node_by_def_id()` whenever possible in compiler Fix clippy errors Fix compiler Apply suggestions from code review Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com> Add FIXME for `tcx.hir()` returned type about its removal Simplify with with `tcx.hir_node_by_def_id`
2023-12-01Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-syncPhilipp Krones-1/+1
2023-11-26rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` ↵Vadim Petrochenkov-1/+1
cleanup
2023-11-17rename bound region instantiationlcnr-1/+1
- `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased` - `replace_late_bound_regions_X` -> `instantiate_bound_regions_X`
2023-11-16Merge commit 'edb720b199083f4107b858a8761648065bf38d86' into clippyupPhilipp Krones-117/+94
2023-11-02Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyupPhilipp Krones-16/+19
2023-10-21Merge commit '2b030eb03d9e5837440b1ee0b98c50b97c0c5889' into clippyupPhilipp Krones-37/+101
2023-08-04Improve spans for indexing expressionsNilstrieb-1/+1
Indexing is similar to method calls in having an arbitrary left-hand-side and then something on the right, which is the main part of the expression. Method calls already have a span for that right part, but indexing does not. This means that long method chains that use indexing have really bad spans, especially when the indexing panics and that span in coverted into a panic location. This does the same thing as method calls for the AST and HIR, storing an extra span which is then put into the `fn_span` field in THIR.
2023-07-17Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyupPhilipp Krones-16/+20
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-6/+6
2023-05-05Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyupPhilipp Krones-2/+7
2023-04-23Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyupPhilipp Krones-1/+1
2023-04-11Merge commit '83e42a2337dadac915c956d125f1d69132f36425' into clippyupPhilipp Krones-3/+15
2023-03-24Merge commit 'd5e2a7aca55ed49fc943b7a07a8eba05ab5a0079' into clippyupPhilipp Krones-4/+1
2023-03-22rustc: Remove unused `Session` argument from some attribute functionsVadim Petrochenkov-3/+3
2023-03-21Use local key in providersMichael Goulet-3/+3
2023-03-10Merge commit '3c06e0b1ce003912f8fe0536d3a7fe22558e38cf' into clippyupPhilipp Krones-4/+4
2023-02-25Merge commit '149392b0baa4730c68f3c3eadf5c6ed7b16b85a4' into clippyupJason Newcomb-0/+79
2023-02-10Merge commit '0f7558148c22e53cd4608773b56cdfa50dcdeac3' into clippyupPhilipp Krones-8/+2
2023-01-28Take a LocalDefId in hir::Visitor::visit_fn.Camille GILLOT-18/+19
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-2/+2
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-2/+2
2022-12-29Merge commit '4f3ab69ea0a0908260944443c739426cc384ae1a' into clippyupPhilipp Krones-5/+28
2022-12-01Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyupPhilipp Krones-3/+175
2022-11-21Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyupPhilipp Krones-34/+66
2022-10-29Rollup merge of #103625 - WaffleLapkin:no_tyctxt_dogs_allowed, r=compiler-errorsGuillaume Gomez-1/+1
Accept `TyCtxt` instead of `TyCtxtAt` in `Ty::is_*` functions Functions in answer: - `Ty::is_freeze` - `Ty::is_sized` - `Ty::is_unpin` - `Ty::is_copy_modulo_regions` This allows to remove a lot of useless `.at(DUMMY_SP)`, making the code a bit nicer :3 r? `@compiler-errors`
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-18/+18
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-10-27Update toolingMaybe Waffle-1/+1
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-8/+8
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-23Merge commit '4f142aa1058f14f153f8bfd2d82f04ddb9982388' into clippyupflip1995-7/+8
2022-10-06Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyupPhilipp Krones-112/+71
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-18/+18
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-09Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyupPhilipp Krones-6/+6
2022-09-05separate the receiver from arguments in HIR under /clippyTakayuki Maeda-2/+21
2022-08-31Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyupJason Newcomb-71/+151
2022-06-16Merge commit 'd7b5cbf065b88830ca519adcb73fad4c0d24b1c7' into clippyupflip1995-2/+3
2022-05-10update clippylcnr-4/+4
2022-05-05Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyupflip1995-8/+3
2022-04-29errors: `span_suggestion` takes `impl ToString`David Wood-1/+1
Change `span_suggestion` (and variants) to take `impl ToString` rather than `String` for the suggested code, as this simplifies the requirements on the diagnostic derive. Signed-off-by: David Wood <david.wood@huawei.com>
2022-04-23Stop visiting visibility.Camille GILLOT-4/+3
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-2/+2
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-02-21update clippylcnr-1/+1
2022-01-21Remove a span from hir::ExprKind::MethodCallCameron Steffen-2/+2
2022-01-18Auto merge of #93001 - flip1995:clippyup, r=Manishearthbors-4/+7
Out of cycle Clippy update I want to do an out-of-cycle sync for rust-lang/rust-clippy#8295, and possibly backport this to stable together with https://github.com/rust-lang/rust/issues/92938. If this doesn't get backported to stable, then I at least want to backport it to beta. r? `@Manishearth`
2022-01-17Merge commit '8d14c94b5c0a66241b4244f1c60ac5859cec1d97' into clippyupflip1995-4/+7
2022-01-16Fix Visitor::NestedFilter in ClippyCameron Steffen-14/+1
2022-01-15Return a LocalDefId in get_parent_item.Camille GILLOT-2/+2
2022-01-13Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyupflip1995-19/+15
2021-12-06Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyupflip1995-2/+9
2021-10-21Merge commit '91496c2ac6abf6454c413bb23e8becf6b6dc20ea' into clippyupflip1995-9/+3