Hayashi Mikihiro
7c7d440188
add assert to check ast_index smaller than INNER_ATTR_SET_BIT
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-08 23:37:47 +09:00
Hayashi Mikihiro
ab4ba5cd29
Remove ast index mask
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
52b523aabe
import std::iter::repeat
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
7d6956ea57
Update crates/hir-expand/src/attrs.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
b786f98761
Update crates/hir-expand/src/attrs.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2025-05-06 17:45:09 +09:00
Hayashi Mikihiro
9f6b4255c2
fix: resolve doc path if outer comments exist on module and replace from cfg_attr bit to doc_place bit
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06 17:45:09 +09: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
f9c83edf12
fix: Fix move_bounds assists not working for lifetimes
2025-05-05 15:07:36 +02:00
Matthias Krüger
573c47c9ba
remove a couple of clones
2025-05-01 11:41:42 +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
4cc6ee3f01
refactor: Remove unnecessary extension trait
2025-04-29 13:53:57 +02:00
Lukas Wirth
d11dbf648f
Cleanup cfg check handling in expression store lowering
2025-04-29 11:44:11 +02:00
David Barsky
fe7b4f2ad9
Merge pull request #19699 from ChayimFriedman2/escape-label
...
fix: Escape raw names in labels properly
2025-04-28 21:12:21 +00: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
Chayim Refael Friedman
e6ebf0b8a1
Don't escape 'static
...
As it is a valid lifetime without escaping.
It does need to be escaped as a label, but we have no way to distinguish that.
2025-04-26 21:20:43 +03:00
Chayim Refael Friedman
d781d02cf4
Escape raw names in labels properly
2025-04-26 21:10:43 +03:00
Chayim Refael Friedman
db72e2ff41
Adjust for salsa::Id::from_u32() being unsafe
...
This impacts our manual `salsa::Id` wrappers. I refactored them a bit to improve safety.
2025-04-22 15:19:35 +03: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
Chayim Refael Friedman
9477e46bec
Get rid of static predefined symbols
...
Make them all `const`.
2025-04-21 03:07:35 +03:00
Chayim Refael Friedman
c58ddafe90
Make HirFileId, EditionedFileId and macro files Salsa struct
...
And make more queries non-interned.
Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
Tyler Breisacher
f9716e4782
Remove incorrect doc comment
2025-04-14 19:05:13 -07:00
Lukas Wirth
07212140db
refactor: Turn LifetimeRef into an enum
...
This makes things more structured
2025-04-09 15:58:06 +02:00
Lukas Wirth
1fd9520c92
refactor: Lower type-refs before type inference
...
This refactors how we deal with items in hir-def lowering.
- It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures.
- We now uniformly lower type AST into TypeRefs before type inference.
- Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion.
- Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).
2025-04-09 10:43:23 +02:00
David Barsky
9aa99eec60
internal: fix salsa-ified crate graph working with lazy project discovery
2025-04-04 12:14:55 -04:00
BenjaminBrienen
2462624a7d
prefer default over new
2025-04-04 15:49:50 +02:00
Lukas Wirth
1e1571e1c8
fix: Fix new nightly lints
2025-03-31 13:27:54 +02:00
Vadim Petrochenkov
4b15451f0a
Remove attribute #[rustc_error]
2025-03-30 01:32:21 +03:00
Lukas Wirth
faf1b49a9a
fix: Fix, clarify and require a value for proc_macro_cwd of CrateData
2025-03-29 08:08:48 +01:00
Lukas Wirth
500ea05aef
chore: Bump dependencies
2025-03-23 08:46:10 +01:00
Lukas Wirth
d4122434dd
chore: Remove unused dependencies
2025-03-23 08:08:17 +01:00
Lukas Wirth
3d9ac497aa
fix: Fix incorrect expansion of builtin PartialOrd derive
2025-03-21 12:14:39 +01:00
Lukas Wirth
a505420751
chore: Bump Edition::CURRENT to 2024
2025-03-17 12:29:19 +01:00
Lukas Wirth
a06aadb9f0
internal: Render root syntax contexts more clearly
2025-03-16 16:26:07 +01:00
Lukas Wirth
c28b80c321
internal: Symbol is not PartialOrd
2025-03-16 16:06:06 +01:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01:00
BenjaminBrienen
aad66c7bf1
Fix 2024 syntax errors
2025-03-15 21:32:01 +01:00
Lukas Wirth
220d913cbc
Merge pull request #19366 from Veykril/push-mkunlxkysssr
...
chore: Remove legacy `SyntaxContextId` re-export
2025-03-15 16:25:13 +00:00
Lukas Wirth
02a793bd59
chore: Remove legacy SyntaxContextId re-export
2025-03-15 17:09:17 +01:00
Lukas Wirth
f19c416d45
fix: Fix missing with_durability calls
2025-03-15 15:53:23 +01:00
Chayim Refael Friedman
c94e9efbef
Salsify the crate graph
...
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-12 21:02:30 +02:00
David Barsky
74620e64ec
internal: port rust-analyzer to new Salsa
2025-03-10 13:30:51 -04:00
Lukas Wirth
5249b8bf7e
Merge pull request #19327 from Veykril/push-qyyvkulltzpz
...
Fix `path` macro hygiene
2025-03-10 08:45:04 +00:00
Lukas Wirth
af7f89cc9d
Fix path macro hygiene
2025-03-10 09:29:27 +01:00
¨Florian
5335d8cbc5
Fix syntax fixup producing invalid punctuation
...
Fixes #19206 .
Fixes #18244 .
2025-03-08 13:21:00 +01:00
Lukas Wirth
9200f77068
More precise macro modifiers for syntax highlighting
2025-03-01 17:23:51 +01:00
BenjaminBrienen
b19ef6b046
fix doc tests
2025-02-27 14:58:46 +01:00