Tadeo Kondrak
a7c09532a0
Allow lifetime repeats in macros: $($x)'a*
...
This works in rustc. This change isn't motivated by any real code.
I just learned about it and decided to see why it doesn't work with
rust-analyzer.
2025-06-13 18:13:01 -06:00
Lukas Wirth
8643a858db
Turn BlockId
into a #[salsa::tracked]
2025-06-13 17:30:04 +02:00
Lukas Wirth
9f051ee104
Use ThinVec
in ItemScope
in a couple places
2025-06-13 15:34:03 +02:00
Lukas Wirth
b9ce647cf1
Bring back EMPTY item tree deduplication
2025-06-13 14:51:23 +02:00
Lukas Wirth
bd002fe65c
Merge pull request #19982 from Veykril/push-uptnmqtlylsx
...
Simplify and optimize `ItemTree`
2025-06-13 11:16:24 +00:00
Lukas Wirth
16ebd2990f
Remove unnecessary item tree query calls
2025-06-13 13:05:52 +02:00
Lukas Wirth
23712aea06
cargo upgrade
2025-06-13 10:08:20 +02:00
Lukas Wirth
048a01a05d
Remove ast ids from item tree mod items
2025-06-13 08:47:25 +02:00
Lukas Wirth
65e2e2c083
Split mod items into small and big variants
2025-06-13 08:24:50 +02:00
Lukas Wirth
ace69d93e0
Store item tree visibilities in a thin vec
2025-06-13 08:09:57 +02:00
Lukas Wirth
17d848a1bb
Fix tests
2025-06-12 14:01:46 +02:00
Lukas Wirth
d8a6aaef96
Return item tree query results by ref
2025-06-12 13:35:43 +02:00
Lukas Wirth
2448abdb55
Remove dead code
2025-06-12 13:35:43 +02:00
Lukas Wirth
23eef0c4ea
Shrink ModItem
by usize
2025-06-12 13:35:43 +02:00
Chayim Refael Friedman
8715e6f8ac
Merge pull request #19983 from ChayimFriedman2/proc-macro-eq
...
fix: Fix comparison of proc macros
2025-06-12 10:42:21 +00:00
Chayim Refael Friedman
4f54885901
Fix comparison of proc macros
...
Comparing the TypeId is not enough, they also contain data.
2025-06-12 13:31:55 +03:00
Lukas Wirth
83a7ecdead
Remove AttrOwner
2025-06-12 12:09:41 +02:00
Lukas Wirth
f27268f319
Ditch the unnecessary smallvec
2025-06-12 11:27:55 +02:00
Lukas Wirth
8930c58d30
Coalesce item tree data maps
2025-06-12 11:21:26 +02:00
Lukas Wirth
80996dca35
AttrOwner
needs no ModItem
2025-06-12 11:05:18 +02:00
Lukas Wirth
f3434f537f
Remove FileItemTreeId
2025-06-12 10:25:06 +02:00
Lukas Wirth
e9f8ecab45
Remove ItemTreeId
2025-06-12 10:25:06 +02:00
Lukas Wirth
13494f4cac
ItemTree
's ItemVisibilities
has no identity, so deduplicate
2025-06-12 09:14:43 +02:00
Chayim Refael Friedman
0a1a78cb87
Remove most of the item tree
...
I'm joking, but now that the def map is the only thing that uses the item tree, we can remove a lot of things from it that aren't needed for the def map.
2025-06-12 08:50:43 +03:00
Chayim Refael Friedman
ed0b4506dd
Avoid referring to the item tree except in the def map
...
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-12 08:50:40 +03:00
Chayim Refael Friedman
4bcf03e28b
Use stable AST IDs
...
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-12 08:47:22 +03:00
Wilfred Hughes
e7ae13368b
[minor] Fix typos
2025-06-10 13:22:03 +01:00
Lukas Wirth
7c3de05e3a
Give path segment type anchors their own grammar rule
2025-06-04 11:40:05 +02:00
Lukas Wirth
9a786d0008
Support derive-macros for rename prefix magic
2025-06-02 15:27:13 +02:00
Lukas Wirth
6440fe2a01
Back out "Fix IDE resolution of item macros"
...
This backs out commit 3e0ab7219a5464999652beca22698cd46e1e48e8.
2025-05-28 07:09:21 +02:00
Lukas Wirth
bbbcfaab8b
fix: Fix IDE layer not resolving some macro calls
2025-05-28 06:58:40 +02:00
Trevor Gross
e6e5e3cc41
chore: Remove support for concat_idents!
...
`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-28 03:59:32 +00:00
Chayim Refael Friedman
7fa66d67a7
Merge pull request #19862 from ChayimFriedman2/item-resolve-macro-hir
...
fix: Fix IDE resolution of item macros
2025-05-26 21:34:18 +00:00
Chayim Refael Friedman
3e0ab7219a
Fix IDE resolution of item macros
...
It wasn't inside the source, because there was no source map.
2025-05-25 17:20:20 +03:00
Lukas Wirth
cbff4ae151
Bump salsa
2025-05-23 12:58:00 +02:00
Laurențiu Nicola
ac8c057d87
Bump rustc crates
2025-05-20 10:03:14 +03:00
Laurențiu Nicola
9e86544698
Merge from rust-lang/rust
2025-05-20 10:01:00 +03:00
Chayim Refael Friedman
5ed11234cc
Improve asm support
...
Including:
- Infer `label {}` and `const` operands.
- Correctly handle unsafe check inside `label {}`.
- Fix an embarrassing parser typo that cause labels to never be part of the AST
2025-05-15 23:36:00 +03:00
Marijn Schouten
618c3de146
Remove duplicate impl of string unescape
2025-05-06 10:00:22 +00:00
Chayim Refael Friedman
3b3e89240d
Don't panic on some weird code
2025-05-06 10:54:35 +03:00
Lukas Wirth
d40455fec0
Merge pull request #19749 from Veykril/push-tsxvxzzmlxpq
...
refactor: Remove unnecessary `AsAny` trait
2025-05-05 14:53:57 +00:00
Lukas Wirth
091b7b2465
refactor: Remove unnecessary AsAny
trait
2025-05-05 16:42:17 +02:00
Vishruth-Thimmaiah
109d933736
fix: negative nums in concat!
expansion
2025-05-05 19:00:24 +05:30
Lukas Wirth
9d1364b730
minor: Add a mbe test for parsing negative literals
2025-05-05 12:10:48 +02:00
Lukas Wirth
581646236e
refactor: De-arc defmap queries
2025-05-05 09:04:52 +02:00
Lukas Wirth
9a62507f2e
Fix incorrect handling of unresolved non-module imports in name resolution
2025-05-05 08:29:34 +02:00
Lukas Wirth
5d43e752ad
refactor: Simplify macro call id construction
2025-05-02 17:26:48 +02:00
Matthias Krüger
573c47c9ba
remove a couple of clones
2025-05-01 11:41:42 +02:00
Lukas Wirth
e0dca847ad
fix: Improve parser recovery a bit
2025-04-30 16:40:01 +02:00
Lukas Wirth
996d6ed1a3
Split out salsa_macros
...
Does not do much yet due to tracing pulling syn but oh well
2025-04-29 19:43:36 +02:00