about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/hir
AgeCommit message (Collapse)AuthorLines
2025-03-16refactor: Remove unnecessary `Arc`Lukas Wirth-2/+2
2025-03-15display varargs in completion detailAndy Russell-0/+4
2025-03-15cargo fmtBenjaminBrienen-129/+100
2025-03-15Fix 2024 syntax errorsBenjaminBrienen-3/+6
2025-03-15chore: Remove legacy `SyntaxContextId` re-exportLukas Wirth-5/+5
2025-03-14Split `variant_data` into its own queryLukas Wirth-13/+10
2025-03-14Split enum variants out of `enum_data` queryLukas Wirth-2/+6
2025-03-14Split assoc items out of `trait_data`/`impl_data` queriesLukas Wirth-29/+28
2025-03-13internal: don't panic when the crate graph isn't ready #19351David Barsky-5/+8
2025-03-12Emit an error when RTN is used in an incorrect placeChayim Refael Friedman-0/+18
We miss one place: associated type bindings aka. `impl Trait<Type(..): Send>`, but we also miss it for Fn-style parenthesizes error so I left it out for now.
2025-03-12Salsify the crate graphChayim Refael Friedman-41/+38
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-10internal: port rust-analyzer to new SalsaDavid Barsky-63/+77
2025-03-10Merge pull request #19330 from ChayimFriedman2/normalize-projectionLukas Wirth-40/+103
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10Merge pull request #19079 from ChayimFriedman2/rename-conflictLukas Wirth-2/+93
feat: Warn the user when a rename will change the meaning of the program
2025-03-10Merge pull request #19327 from Veykril/push-qyyvkulltzpzLukas Wirth-0/+1
Fix `path` macro hygiene
2025-03-10Fix `path` macro hygieneLukas Wirth-0/+1
2025-03-08fix(hir): `VariantDef` is `impl HasSource`Prajwal S N-1/+11
A new syntax node `ast::VariantDef` has been introduced to map between the HIR node and the AST. The files have been updated with `cargo test -p xtask`. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-06Warn the user when a rename will change the meaning of the programChayim Refael Friedman-2/+93
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it. We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06Pass the target crate in `HirFormatter`Chayim Refael Friedman-40/+103
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-05Merge pull request #19274 from Veykril/push-pouwrwwrlrltLukas Wirth-89/+28
Highlight unsafe operations as unsafe, not definitions
2025-03-05Use HIR unsafety information for unsafe syntax highlightngLukas Wirth-89/+28
2025-03-03Support tuple struct patterns for expand_rest_pattern assistLukas Wirth-0/+2
2025-03-01More precise macro modifiers for syntax highlightingLukas Wirth-28/+21
2025-03-01Cleanup highlighting macro-def handlingLukas Wirth-9/+10
2025-02-27fix doc testsBenjaminBrienen-2/+2
2025-02-27enable doctestBenjaminBrienen-1/+0
2025-02-24Merge pull request #18987 from ChayimFriedman2/drop-glueLukas Wirth-1/+34
feat: Calculate drop glue and show it on hover
2025-02-17Merge pull request #19127 from ChayimFriedman2/different-generic-argsLukas Wirth-2/+14
feat: Refactor path lowering and serve a new path diagnostic
2025-02-17Calculate drop glue and show it on hoverChayim Refael Friedman-1/+34
Also fix the `needs_drop()` intrinsic. Unions also need this information (to err if they have a drop-needing field), but this will come in a follow-up PR.
2025-02-16Refactor path loweringChayim Refael Friedman-2/+14
And add a new diagnostic for non-`Fn` parenthesized generic args. Path lowering started to look like a mess, with each function carrying additional parameters for the diagnostic callback (since paths can occur both in type and in expression/pattern position, and their diagnostic handling is different) and the segment index, for the diagnostics report. So I refactored it from stateless functions on `TyLoweringContext` into stateful struct, `PathLoweringContext`, that tracks the process of lowering a path from resolution til assoc types selection.
2025-02-16Improve error recovery when method-calling an assoc functionLukas Wirth-4/+4
2025-02-12Merge pull request #19109 from Veykril/push-nzpuuqommpnqLukas Wirth-8/+50
fix: Do not show safety hints for extern items lacking semantics
2025-02-12fix: Do not show safety hints for extern items lacking semanticsLukas Wirth-8/+50
2025-02-12Merge pull request #18995 from alibektas/12210Lukas Wirth-52/+68
fix: Lower range pattern bounds to expressions
2025-02-10Shadowing BuiltinType by ModuleHayashi Mikihiro-1/+38
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-02-09Check if PatPtr resolves to ExprIdAli Bektas-34/+41
2025-02-09Fix clippy errorsAli Bektas-1/+1
2025-02-09Remove dbg linesAli Bektas-1/+0
2025-02-09resolve_bind_pat_to_const does not early return if exprAli Bektas-3/+12
2025-02-09make SourceAnalyzer::pat_id return ExprOrPatIdAli Bektas-15/+17
Not all patterns are mapped to Pats. As such, it was necessary to change the ret type Option<PatId> to Option<ExprOrPatId>
2025-02-09Lower ast::Ident to hir::Path when lowering RangePatsAli Bektas-1/+2
2025-02-04Fix IDE resolution of `use` inside a bodyChayim Refael Friedman-1/+5
We stopped the expression search too early because `use` is an item.
2025-02-03Make higher levels adapt Bodys exprs having ExprOrPatId valuesAli Bektas-26/+24
2025-01-27Back out "feat: Implement `default-field-values`"David Barsky-62/+4
This backs out commit 7de0b2e75a541b98f735ee6fcd12d326be38d23f.
2025-01-27Back out "Merge record lit's ellipsis into pre-existing spread's variant"David Barsky-1/+1
This backs out commit c134b20c9cbc88a36e77acb8522e8dc4573bd906.
2025-01-27Back out "Compute diagnostics of a field body iff it has one"David Barsky-35/+12
This backs out commit b4d4d02db8a95f5507fbd0aa90904d7b774f0027.
2025-01-27Back out "Remove `has_default` from `FieldId`"David Barsky-26/+38
This backs out commit 8aa6c09fcee6270c787a6f00615d76343fbe5c07.
2025-01-27Merge pull request #19050 from ChayimFriedman2/iter-selfLukas Wirth-0/+11
fix: Don't suggest `into_iter().method()` on iterators
2025-01-27Merge pull request #19049 from ChayimFriedman2/add-reference-tyLukas Wirth-12/+1
minor: Remove duplicate method from `hir::Type`
2025-01-27Don't suggest `into_iter().method()` on iteratorsChayim Refael Friedman-0/+11