about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/hir-ty
AgeCommit message (Collapse)AuthorLines
2025-08-02When renaming a parameter to `self`, change callers to use method call syntaxChayim Refael Friedman-1/+1
2025-07-31`cargo clippy --fix`Lukas Wirth-672/+605
2025-07-29Merge pull request #20337 from ChayimFriedman2/double-inlay-hintsLukas Wirth-13/+13
fix: When displaying a projection into a type parameter that has bounds as `impl Trait`, collect only the bounds of this projection
2025-07-29When displaying a projection into a type parameter that has bounds as `impl ↵Chayim Refael Friedman-13/+13
Trait`, collect only the bounds of this projection It used to collect the bounds of them all.
2025-07-28Format and bump rustc cratesLaurențiu Nicola-3/+3
2025-07-28Merge ref '733dab558992' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-13/+3
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 733dab558992d902d6d17576de1da768094e2cf3 Filtered ref: 8f0faf94fb41d4e2a85ef2d23e5495f6bea1f31d This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-27Ignore `Destruct` bounds againLukas Wirth-2/+41
2025-07-24Remove dead code and extend test coverage and diagnostics around itOli Scherer-13/+3
We lost the following comment during refactorings: The current code for niche-filling relies on variant indices instead of actual discriminants, so enums with explicit discriminants (RFC 2363) would misbehave.
2025-07-22fix: Apply adjusts to pats and exprs when doing pat analysisShoyu Vanilla-40/+69
2025-07-15Format and bump rustc cratesLaurențiu Nicola-1/+1
2025-07-15Merge from rust-lang/rustLaurențiu Nicola-5/+14
2025-07-15Infer lifetimes for GATs in expression/pattern positionChayim Refael Friedman-2/+6
We should not only in type position.
2025-07-11Merge pull request #20232 from ShoyuVanilla/issue-20225Shoyu Vanilla (Flint)-5/+17
fix: Normalize projection types before calculating memory maps
2025-07-11Add a memory map bound check assertion on rendering const sliceShoyu Vanilla-0/+8
2025-07-11Merge pull request #20219 from ChayimFriedman2/expr-store-memChayim Refael Friedman-35/+32
perf: Put the expression stuff in the expression store behind an `Option<Box>`
2025-07-11fix: Normalize projection types before calculating memory mapsShoyu Vanilla-5/+9
2025-07-10Merge pull request #20228 from ChayimFriedman2/fix-use-displayChayim Refael Friedman-0/+1
fix: Fix display of `use<>` syntax
2025-07-11Fix display of `use<>` syntaxChayim Refael Friedman-0/+1
2025-07-10Merge pull request #20210 from ChayimFriedman2/naked-asm-safeShoyu Vanilla (Flint)-2/+7
fix: Inline asm fixes
2025-07-10Put the expression stuff in the expression store behind an `Option<Box>`Chayim Refael Friedman-35/+32
And leave only the type stuff without it. This is because most expression stores don't have anything but types (e.g. generics, fields, signatures) so this saves a lot of memory. This saves 58mb on `analysis-stats .`.
2025-07-09Differentiate between `asm!()`, `global_asm!()` and `naked_asm!()`, and make ↵Chayim Refael Friedman-2/+7
only `asm!()` unsafe
2025-07-09Auto merge of #143472 - dianne:deref-pat-column-check, r=Nadrierilbors-0/+8
`rustc_pattern_analysis`: always check that deref patterns don't match on the same place as normal constructors In rust-lang/rust#140106, deref pattern validation was tied to the `deref_patterns` feature to temporarily avoid affecting perf. However: - As of rust-lang/rust#143414, box patterns are represented as deref patterns in `rustc_pattern_analysis`. Since they can be used by enabling `box_patterns` instead of `deref_patterns`, it was possible for them to skip validation, resulting in an ICE. This fixes that and adds a regression test. - External tooling (e.g. rust-analyzer) will also need to validate matches containing deref patterns, which was not possible. This fixes that by making `compute_match_usefulness` validate deref patterns by default. In order to avoid doing an extra pass for anything with patterns, the second commit makes `RustcPatCtxt` keep track of whether it encounters a deref pattern, so that it only does the check if so. This is purely for performance. If the perf impact of the first commit is negligible and the complexity cost introduced by the second commit is significant, it may be worth dropping the latter. r? `@Nadrieril`
2025-07-08Revert "Re-enable fixpoint iteration for variance computation"Chayim Refael Friedman-11/+12
2025-07-07Auto merge of #143182 - xdoardo:more-addrspace, r=workingjubileebors-5/+6
Allow custom default address spaces and parse `p-` specifications in the datalayout string Some targets, such as CHERI, use as default an address space different from the "normal" default address space `0` (in the case of CHERI, [200 is used](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-877.pdf)). Currently, `rustc` does not allow to specify custom address spaces and does not take into consideration [`p-` specifications in the datalayout string](https://llvm.org/docs/LangRef.html#langref-datalayout). This patch tries to mitigate these problems by allowing targets to define a custom default address space (while keeping the default value to address space `0`) and adding the code to parse the `p-` specifications in `rustc_abi`. The main changes are that `TargetDataLayout` now uses functions to refer to pointer-related informations, instead of having specific fields for the size and alignment of pointers in the default address space; furthermore, the two `pointer_size` and `pointer_align` fields in `TargetDataLayout` are replaced with an `FxHashMap` that holds info for all the possible address spaces, as parsed by the `p-` specifications. The potential performance drawbacks of not having ad-hoc fields for the default address space will be tested in this PR's CI run. r? workingjubilee
2025-07-07compiler: Parse `p-` specs in datalayout string, allow definition of custom ↵Edoardo Marangoni-5/+6
default data address space
2025-07-06Merge pull request #20184 from Veykril/push-ywpynxnltpokLukas Wirth-18/+30
chore: Remove dead field from `InferenceContext`
2025-07-06chore: Remove dead field from `InferenceContext`Lukas Wirth-18/+30
2025-07-06Merge pull request #20179 from ChayimFriedman2/destructuring-assignment-neverLukas Wirth-2/+61
fix: Fix diverging destructuring assignments
2025-07-05Fix diverging destructuring assignmentsChayim Refael Friedman-2/+61
They need to return `!`, unlike diverging ordinary assignments. See the comment in the code.
2025-07-04always check for mixed deref pattern and normal constructorsdianne-0/+8
This makes it work for box patterns and in rust-analyzer.
2025-07-04`hir_ty::match_check`: remove special handling for box patternsdianne-60/+20
2025-07-03fix: Closure capturing for let exprs, againShoyu Vanilla-5/+30
2025-07-03Merge pull request #20160 from Veykril/push-pqvskktpnyluLukas Wirth-8/+8
fix: Improve diagnostic ranges for `macro_calls!`
2025-07-03fix: Improve diagnostic ranges for `macro_calls!`Lukas Wirth-8/+8
We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input This generally makes things very noisy as the entire macro call will turn red on errors. Instead, we now macro the path and `!` (bang) token as the error source range which is a lot nicer on the eyes.
2025-07-03Re-enable fixpoint iteration for variance computationLukas Wirth-12/+11
2025-07-03Bump salsaLukas Wirth-39/+70
2025-06-29Remove last use of `rustc_pat_analysis::Captures`zachs18-5/+5
It's not necessary anymore due to Rust 2024 lifetime capture rules.
2025-06-28ci: Fix up release workflowLukas Wirth-1/+4
2025-06-26Merge pull request #20100 from ShoyuVanilla/ignore-sized-hierarchyChayim Refael Friedman-6/+47
Backport new sized-hierarchy trait bounds in old ways
2025-06-26Backport new sized-hierarchy trait bounds in old waysShoyu Vanilla-6/+47
2025-06-26Bring back the firewall queryLukas Wirth-0/+1
2025-06-26Salsa idiomize `VariantFields` queryLukas Wirth-51/+48
2025-06-25Merge pull request #20088 from Veykril/push-qrslvzzlqqozLukas Wirth-57/+49
De-arc trait items query
2025-06-25De-arc trait items queryLukas Wirth-57/+49
2025-06-24Short circuit a couple hir-ty/lower queriesLukas Wirth-9/+34
2025-06-24Merge pull request #20036 from Veykril/push-yquvoyrxkksxLukas Wirth-55/+55
Do not default to 'static for trait object lifetimes
2025-06-24Do not default to 'static for trait object lifetimesLukas Wirth-55/+55
We lack trait object default lifetime elision, so `'static` can be wrong at times, confusing the user
2025-06-24Merge pull request #20062 from ChayimFriedman2/doctestsLukas Wirth-0/+1
minor: Don't run doctests
2025-06-24fix: Use `ROOT` hygiene for `args` inside new `format_args!` expansionShoyu Vanilla-0/+14
2025-06-23Merge from rust-lang/rustLaurențiu Nicola-1/+1