about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/hir-expand
AgeCommit message (Collapse)AuthorLines
2025-09-25resolve: Do not finalize shadowed bindingsVadim Petrochenkov-4/+2
I.e. do not mark them as used, or non-speculative loaded, or similar. Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
2025-08-02When renaming a parameter to `self`, change callers to use method call syntaxChayim Refael Friedman-1/+11
2025-07-31`cargo clippy --fix`Lukas Wirth-38/+34
2025-07-20Support `cfg_select!`Chayim Refael Friedman-0/+66
2025-07-10Merge pull request #20210 from ChayimFriedman2/naked-asm-safeShoyu Vanilla (Flint)-2/+32
fix: Inline asm fixes
2025-07-09Differentiate between `asm!()`, `global_asm!()` and `naked_asm!()`, and make ↵Chayim Refael Friedman-2/+32
only `asm!()` unsafe
2025-07-08Revert "Re-enable fixpoint iteration for variance computation"Chayim Refael Friedman-2/+1
2025-07-06Always bump in the parser in `err_and_bump()`Chayim Refael Friedman-1/+1
Even when at curly braces, otherwise the parser can get stuck. This has happened in the past in #18625, but it was just worked around instead of handling the root of the problem. Now this happened again in #20171. IMO we can't let `err_and_bump()` not bump, that's too confusing and invites errors. We can (as I did) workaround the worse recovery instead.
2025-07-03Fix some things with builtin derivesChayim Refael Friedman-58/+82
1. Err on unions on derive where it's required. 2. Err on `#[derive(Default)]` on enums without `#[default]` variant. 3. Don't add where bounds `T: Default` when expanding `Default` on enums (structs need that, enums not). Also, because I was annoyed by that, in minicore, add a way to filter on multiple flags in the line-filter (`// :`). This is required for the `Debug` and `Hash` derives, because the derive should be in the prelude but the trait not.
2025-07-03Merge pull request #20160 from Veykril/push-pqvskktpnyluLukas Wirth-9/+31
fix: Improve diagnostic ranges for `macro_calls!`
2025-07-03fix: Improve diagnostic ranges for `macro_calls!`Lukas Wirth-9/+31
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-03Merge pull request #20157 from Veykril/push-nxrvpywtvoysLukas Wirth-1/+2
Re-enable fixpoint iteration for variance computation
2025-07-03Re-enable fixpoint iteration for variance computationLukas Wirth-1/+2
2025-07-03Merge pull request #19923 from Veykril/push-rlrsyxsqnxnnLukas Wirth-2/+2
Bump salsa
2025-07-03Bump salsaLukas Wirth-2/+2
2025-07-03Merge pull request #20112 from Veykril/push-ruszuxrqzmvzLukas Wirth-32/+17
Workaround missing none group support in builtin macros
2025-07-03Restructure proc-macro loading erros, differentiate hard error property on kindLukas Wirth-12/+10
2025-06-27Workaround missing none group support in builtin macrosLukas Wirth-32/+17
2025-06-24Merge pull request #20012 from lnicola/bump-literal-escaperLukas Wirth-20/+19
Update to literal-escaper 0.0.4
2025-06-23Don't run doctestsChayim Refael Friedman-0/+1
2025-06-17Auto merge of #142567 - lnicola:sync-from-ra, r=lnicolabors-26/+38
Subtree update of `rust-analyzer` r? `@ghost`
2025-06-16update to literal-escaper 0.0.4 for better API without `unreachable` and ↵Marijn Schouten-20/+19
faster string parsing
2025-06-15clarify `rustc_do_not_const_check` commentDeadbeef-1/+1
2025-06-12Fix comparison of proc macrosChayim Refael Friedman-3/+1
Comparing the TypeId is not enough, they also contain data.
2025-06-12Merge pull request #19837 from ChayimFriedman2/stable-astidLukas Wirth-3/+11
Provide better incrementality when items are changed
2025-06-12LRU ast id mapChayim Refael Friedman-0/+1
We can do that and it's pretty heavy.
2025-06-12Avoid referring to the item tree except in the def mapChayim Refael Friedman-1/+8
Item tree IDs are very unstable (adding an item of a kind invalidates all following items of the same kind). Instead use ast ids, which, since the previous commit, are pretty stable.
2025-06-12Use stable AST IDsChayim Refael Friedman-4/+4
Instead of simple numbering, we hash important bits, like the name of the item. This will allow for much better incrementality, e.g. when you add an item. Currently, this invalidates the IDs of all following items, which invalidates pretty much everything.
2025-06-08Correctly handle attr macros placed in cfg_attr in speculative expansionChayim Refael Friedman-20/+26
2025-05-30Add some more `hir_expand::files` conversionsLukas Wirth-47/+103
2025-05-28Back out "Fix IDE resolution of item macros"Lukas Wirth-2/+0
This backs out commit 3e0ab7219a5464999652beca22698cd46e1e48e8.
2025-05-28chore: Remove support for `concat_idents!`Trevor Gross-25/+0
`concat_idents!` was deprecated in [1] and will be removed in the near future. rust-analyzer's support is independent of rustc's, so drop RA support now to make syncing easier. [1]: https://github.com/rust-lang/rust/pull/137653
2025-05-25Fix IDE resolution of item macrosChayim Refael Friedman-0/+2
It wasn't inside the source, because there was no source map.
2025-05-08add assert to check ast_index smaller than INNER_ATTR_SET_BITHayashi Mikihiro-13/+9
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06Remove ast index maskHayashi Mikihiro-7/+10
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06import std::iter::repeatHayashi Mikihiro-0/+1
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06Update crates/hir-expand/src/attrs.rsHayashi Mikihiro-1/+1
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06Update crates/hir-expand/src/attrs.rsHayashi Mikihiro-1/+1
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06fix: resolve doc path if outer comments exist on module and replace from ↵Hayashi Mikihiro-25/+22
cfg_attr bit to doc_place bit Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-05Merge pull request #19749 from Veykril/push-tsxvxzzmlxpqLukas Wirth-12/+4
refactor: Remove unnecessary `AsAny` trait
2025-05-05refactor: Remove unnecessary `AsAny` traitLukas Wirth-12/+4
2025-05-05fix: negative nums in `concat!` expansionVishruth-Thimmaiah-1/+34
2025-05-05fix: Fix `move_bounds` assists not working for lifetimesLukas Wirth-5/+8
2025-05-01remove a couple of clonesMatthias Krüger-1/+1
2025-04-29Split out salsa_macrosLukas Wirth-5/+5
Does not do much yet due to tracing pulling syn but oh well
2025-04-29refactor: Remove unnecessary extension traitLukas Wirth-65/+4
2025-04-29Cleanup cfg check handling in expression store loweringLukas Wirth-64/+96
2025-04-28Merge pull request #19699 from ChayimFriedman2/escape-labelDavid Barsky-5/+18
fix: Escape raw names in labels properly
2025-04-28Merge pull request #19704 from Veykril/push-wrvznvvpvtvpLukas Wirth-4/+2
Add expression fill mode variant for filling with underscore expressions
2025-04-28Add expression fill mode variant for filling with underscore expressionsLukas Wirth-4/+2