Lukas Wirth
23712aea06
cargo upgrade
2025-06-13 10:08:20 +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
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
Lukas Wirth
d11dbf648f
Cleanup cfg check handling in expression store lowering
2025-04-29 11:44:11 +02:00
Lukas Wirth
6355df9c57
refactor: De-arc lang item queries
2025-04-28 17:17:39 +02:00
Lukas Wirth
5adee2ad2c
Merge pull request #19706 from Veykril/push-nkpmknlvzyom
...
fix: Address minor FIXME
2025-04-28 10:12:20 +00:00
Lukas Wirth
48fb00c19d
fix: Address minor FIXME
2025-04-28 11:55:26 +02:00
Lukas Wirth
0fee71065b
Merge pull request #19704 from Veykril/push-wrvznvvpvtvp
...
Add expression fill mode variant for filling with underscore expressions
2025-04-28 09:45:04 +00:00
Lukas Wirth
7e526b6be7
Add expression fill mode variant for filling with underscore expressions
2025-04-28 10:39:36 +02:00
Laurențiu Nicola
6225bb9c44
Merge from rust-lang/rust
2025-04-28 11:06:53 +03:00
Lukas Wirth
71a3888d07
Merge pull request #19688 from ChayimFriedman2/less-unused
...
internal: More `shrink_to_fit()` and upgrade dashmap and hashbrown
2025-04-25 10:19:38 +00:00
Chayim Refael Friedman
1fe060719a
shrink_to_fit()
in more places
...
This saves 18mb on `analysis-stats .`, without regressing speed.
2025-04-25 10:55:12 +03:00
Lukas Wirth
61df8ec4b8
Arena allocate LifetimeRef
s
2025-04-24 09:55:06 +02:00
Lukas Wirth
99a7e423e2
Shrink WherePredicate
by 8 bytes
2025-04-24 09:23:00 +02:00
Lukas Wirth
4a2eaddc77
refactor: Remove WherePredicateTypeTarget
2025-04-24 09:13:56 +02:00
Chayim Refael Friedman
adcf699ea3
Properly handle lifetimes when checking generic arguments len
...
And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
2025-04-24 08:35:20 +03:00
Chayim Refael Friedman
57c019a3c5
Adapt for new cycle handling changing in Salsa
2025-04-22 15:20:05 +03:00
Chayim Refael Friedman
99ce53b1d7
Add two new diagnostics: one for mismatch in generic arguments count, and another for mismatch in their kind
...
Also known as E0747 and E0107.
And by the way, rewrite how we lower generic arguments and deduplicate it between paths and method calls. The new version is taken almost straight from rustc.
This commit also changes the binders of `generic_defaults()`, to only include the binders of the arguments up to (and not including) the current argument. This make it easier to handle it in the rewritten lowering of generic args. It's also how rustc does it.
2025-04-22 14:55:43 +03:00
Lukas Wirth
cb6ddbedb0
refactor: Fold hygiene map into bindings themselves
...
`HygieneId` fits into `Binding`'s padding.
2025-04-21 16:53:06 +02:00
Lukas Wirth
34e7d60e30
Merge pull request #19644 from ChayimFriedman2/const-syms
...
internal: Make predefined symbols `const` instead of `static`
2025-04-21 12:34:59 +00:00
Lukas Wirth
d16b862ea5
fix: Support unstable UnsafePinned
struct in type layout calc
2025-04-21 09:35:30 +02:00
Chayim Refael Friedman
0f325c7ff8
Remove unnecessary predefined symbol clones
...
Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-21 03:10:13 +03:00