about summary refs log tree commit diff
path: root/clippy_lints/src/ptr.rs
AgeCommit message (Collapse)AuthorLines
2025-02-20Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-1/+1
2025-02-17Overhaul the `intravisit::Map` trait.Nicholas Nethercote-2/+2
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-07clippy: directly use rustc_abi instead of reexportsJubilee Young-3/+3
2025-02-06Merge commit '3e3715c31236bff56f1c63a1de2c7bbdfcfb0923' into ↵Philipp Krones-10/+20
clippy-subtree-update
2025-02-02add autofix for `cmp_null`lapla-cogito-10/+20
2025-01-14Add hir::HeaderSafety to make follow up commits simplerOli Scherer-1/+1
2025-01-04turn hir::ItemKind::Fn into a named-field variantRalf Jung-1/+1
2024-12-18introduce `LateParamRegionKind`lcnr-1/+1
2024-12-14Add some convenience helper methods on `hir::Safety`Oli Scherer-2/+2
2024-11-28Merge commit 'ff4a26d442bead94a4c96fb1de967374bc4fbd8e' into ↵Philipp Krones-3/+1
clippy-subtree-update
2024-11-14Merge commit '786fbd6d683933cd0e567fdcd25d449a69b4320c' into ↵Philipp Krones-3/+2
clippy-subtree-update
2024-10-29update toolslcnr-1/+1
2024-10-18Merge commit 'a109190d7060236e655fc75533373fa274ec5343' into ↵Philipp Krones-3/+5
clippy-subtree-update
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-2/+6
clippy-subtree-update
2024-09-24Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into ↵Philipp Krones-63/+43
clippy-subtree-update
2024-08-24Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyupJason Newcomb-8/+8
2024-05-29Don't require `visit_body` to take a lifetime that must outlive the function ↵Oli Scherer-3/+3
call
2024-05-24Remove `DefId` from `EarlyParamRegion` (clippy/smir)Boxy-10/+9
2024-05-17Rename Unsafe to SafetySantiago Pastorino-2/+2
2024-05-02Merge commit '20b085d500dfba5afe0869707bf357af3afe20be' into ↵Philipp Krones-6/+3
clippy-subtree-update
2024-04-17Rename `BindingAnnotation` to `BindingMode`Jules Bertholet-3/+3
2024-04-16Avoid lots of `hir::HirId{,Map,Set}` qualifiers.Nicholas Nethercote-2/+2
Because they're a bit redundant.
2024-04-04Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into ↵Philipp Krones-3/+3
clippy-subtree-update
2024-03-22Rename `hir::Node::Local` into `hir::Node::LetStmt`Guillaume Gomez-1/+1
2023-12-01Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-syncPhilipp Krones-19/+23
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-1/+1
2023-11-14finish `RegionKind` renamelcnr-2/+2
- `ReFree` -> `ReLateParam` - `ReEarlyBound` -> `ReEarlyParam`
2023-11-13rename `ReLateBound` to `ReBound`lcnr-1/+1
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-11-03Auto merge of #117507 - nnethercote:rustc_span, r=Nilstriebbors-2/+1
`rustc_span` cleanups Just some things I found while looking over this crate. r? `@oli-obk`
2023-11-02Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyupPhilipp Krones-100/+85
2023-11-02Minimize `pub` usage in `source_map.rs`.Nicholas Nethercote-2/+1
Most notably, this commit changes the `pub use crate::*;` in that file to `use crate::*;`. This requires a lot of `use` items in other crates to be adjusted, because everything defined within `rustc_span::*` was also available via `rustc_span::source_map::*`, which is bizarre. The commit also removes `SourceMap::span_to_relative_line_string`, which is unused.
2023-10-05Add more diagnostic items for clippyJason Newcomb-56/+38
2023-09-25Merge commit '7671c283a50b5d1168841f3014b14000f01dd204' into clippyupPhilipp Krones-14/+7
2023-08-24Merge commit '080b587854a73f2a8cbaecff1884860a78e2ff37' into clippyupPhilipp Krones-6/+19
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-31Merge commit '5436dba826191964ac1d0dab534b7eb6d4c878f6' into clippyupPhilipp Krones-0/+13
2023-07-17Merge commit 'd9c24d1b1ee61f276e550b967409c9f155eac4e3' into clippyupPhilipp Krones-5/+9
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-7/+7
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-2/+2
2023-07-02Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyupPhilipp Krones-35/+70
2023-06-19s/Clause/ClauseKindMichael Goulet-2/+2
2023-02-16Rename some region-specific stuffMichael Goulet-2/+2
2023-02-10Merge commit '0f7558148c22e53cd4608773b56cdfa50dcdeac3' into clippyupPhilipp Krones-1/+4
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-3/+3
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-3/+3
2022-12-28Rename `Rptr` to `Ref` in AST and HIRNilstrieb-5/+5
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-01Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyupPhilipp Krones-4/+5
2022-11-27Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errorsbors-12/+7
Separate lifetime ident from lifetime resolution in HIR Drive-by: change how suggested generic args are computed. Fixes https://github.com/rust-lang/rust/issues/103815 I recommend reviewing commit-by-commit.
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-2/+2