about summary refs log tree commit diff
path: root/clippy_utils/src/check_proc_macro.rs
AgeCommit message (Collapse)AuthorLines
2025-02-17Move some `Map` methods onto `TyCtxt`.Nicholas Nethercote-1/+1
The end goal is to eliminate `Map` altogether. I added a `hir_` prefix to all of them, that seemed simplest. The exceptions are `module_items` which became `hir_module_free_items` because there was already a `hir_module_items`, and `items` which became `hir_free_items` for consistency with `hir_module_free_items`.
2025-02-07clippy: directly use rustc_abi instead of reexportsJubilee Young-3/+3
2025-01-28Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into ↵Philipp Krones-1/+3
clippy-subtree-update
2025-01-23The clipper :3cBoxy-1/+1
2025-01-23Make `hir::TyKind::TraitObject` use tagged ptrBoxy-1/+1
2025-01-04turn hir::ItemKind::Fn into a named-field variantRalf Jung-1/+1
2024-12-14Add some convenience helper methods on `hir::Safety`Oli Scherer-1/+1
2024-11-14Merge commit '786fbd6d683933cd0e567fdcd25d449a69b4320c' into ↵Philipp Krones-3/+3
clippy-subtree-update
2024-11-07Merge commit 'f712eb5cdccd121d0569af12f20e6a0fabe4364d' into ↵Philipp Krones-11/+17
clippy-subtree-update
2024-11-04Move two attribute lints to be early pass (post expansion)Jonathan Dönszelmann-2/+3
2024-10-10Auto merge of #13464 - y21:issue13458, r=flip1995bors-54/+81
Don't warn on proc macro generated code in `needless_return` Fixes #13458 Fixes #13457 Fixes #13467 Fixes #13479 Fixes #13481 Fixes #13526 Fixes #13486 The fix is unfortunately a little more convoluted than just simply adding a `is_from_proc_macro`. That check *does* fix the issue, however it also introduces a bunch of false negatives in the tests, specifically when the returned expression is in a different syntax context, e.g. `return format!(..)`. The proc macro check builds up a start and end pattern based on the HIR nodes and compares it to a snippet of the span, however that would currently fail for `return format!(..)` because we would have the patterns `("return", <something inside of the format macro>)`, which doesn't compare equal. So we now return an empty string pattern for when it's in a different syntax context. "Hide whitespace" helps a bit for reviewing the proc macro detection change changelog: none
2024-10-04rm `ItemKind::OpaqueTy`Noah Lev-1/+1
This introduce an additional collection of opaques on HIR, as they can no longer be listed using the free item list.
2024-09-24Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into ↵Philipp Krones-2/+2
clippy-subtree-update
2024-08-24Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyupJason Newcomb-7/+5
2024-06-27Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into ↵Philipp Krones-42/+42
clippy-subtree-update
2024-05-17Rename Unsafe to SafetySantiago Pastorino-6/+5
2024-04-04Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into ↵Philipp Krones-4/+8
clippy-subtree-update
2023-12-20Give `VariantData::Struct` named fields, to clairfy `recovered`.Alona Enraght-Moony-2/+2
2023-12-16Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyupPhilipp Krones-39/+41
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-11-02Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyupPhilipp Krones-1/+3
2023-08-14Move scrutinee `HirId` into `MatchSource::TryDesugar`Esteban Küber-1/+1
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-10/+10
2023-07-02Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyupPhilipp Krones-9/+113
2023-05-05Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyupPhilipp Krones-1/+1
2023-03-14Remove box expressions from HIRclubby789-1/+0
2022-12-02Add `StrStyle` to `ast::LitKind::ByteStr`.Nicholas Nethercote-1/+3
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-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-1/+1
2022-09-09Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyupPhilipp Krones-2/+2
2022-09-05separate the receiver from arguments in HIR under /clippyTakayuki Maeda-2/+2
2022-08-11Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyupPhilipp Krones-0/+329