Chayim Refael Friedman
6315e315ad
Expand target info to include the architecture
...
And make it easier to expand it more in the future, if needed.
2025-09-09 13:47:26 +03:00
Shoyu Vanilla
15ac6a21dd
fix: Make lang items query properly filter out overwritten/excluded sysroots
2025-08-17 22:28:04 +09:00
Lukas Wirth
8ce30264c8
cargo clippy --fix
2025-07-31 10:55:10 +02: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
42e8e4ac4e
Enhance renaming to include identifiers that are generated from the original symbol
...
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2025-06-02 15:26:21 +02:00
Lukas Wirth
091b7b2465
refactor: Remove unnecessary AsAny
trait
2025-05-05 16:42:17 +02:00
Matthias Krüger
573c47c9ba
remove a couple of clones
2025-05-01 11:41:42 +02: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
BenjaminBrienen
2462624a7d
prefer default over new
2025-04-04 15:49:50 +02: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
a505420751
chore: Bump Edition::CURRENT
to 2024
2025-03-17 12:29:19 +01:00
Lukas Wirth
b5eedad8e3
refactor: Remove unnecessary Arc
2025-03-16 10:27:48 +01:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +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
Mehul Arora
3a31741627
Use correct working directory for non-workspace proc-macro execution
2025-02-17 10:36:32 -05:00
Chayim Refael Friedman
933832008b
Censor cfg_attr for attribute macros
...
This is not documented (and I discovered that from experimenting and looking at the compiler's source code), but cfg_attrs *on the same level* as the attribute macro should be processed before it is expanded. cfg_attrs *below* should not (and this is contrary to what happens with derive macros, where both should be processed).
2025-02-10 01:28:28 +02:00
Lukas Wirth
ab5e821d97
Expose symbol of CrateName
2025-02-04 14:38:58 +01:00
Lukas Wirth
bf669dab84
Re-implement rust string highlighting via tool attribute
2025-01-10 13:49:35 +01:00
Chayim Refael Friedman
bbcb71a403
Fix another issue with fixup reversing
...
We need to *remove* the whole subtree, but we don't advance `i` by this, because it hasn't gotten there yet (and never will).
2025-01-09 22:02:44 +02:00
Laurențiu Nicola
8eb5d3c6f3
Fix test-fixture autopublishing
2025-01-08 10:19:46 +02:00
Vishruth-Thimmaiah
cb0221d774
fix: do not offer completions within macro strings
2025-01-07 17:02:28 +05:30
Chayim Refael Friedman
f7c4833830
Fix a bug that was caused by fixup reversing
2025-01-06 20:06:20 +02:00
Chayim Refael Friedman
ceba289f80
Store token trees in contiguous Vec
instead of as a tree
...
I expected this to be faster (due to less allocations and better cache locality), but benchmarked it is not (neither it is slower). Memory usage, however, drops by ~50mb (of `analysis-stats .`). I guess tt construction is just not hot.
This also simplifies using even less memory for token trees by compressing equal span, which I plan to do right after.
Some workflows are more easily expressed with a flat tt, while some are better expressed with a tree. With the right helpers, though (which was mostly a matter of trial and error), even the worst workflows become very easy indeed.
2025-01-02 19:21:46 +02:00
Lukas Wirth
956ff4d8c5
Rename test fixture crates to ra_test_fixture
2024-12-09 11:40:21 +01:00
Sam McCall
98f3304831
Publish test-fixture => ra_ap_test_fixture
2024-10-29 16:26:18 +01:00
Chayim Refael Friedman
35e171aa01
Always cache macro expansions' root node in Semantics
...
Previously some expansions were not cached, but were cached in the expansion cache, which caused panics when later queries tried to lookup the node from the expansion cache.
2024-09-17 00:19:39 +03:00
Lukas Wirth
c2258d8880
Properly set the working directory for proc-macro execution
2024-09-11 12:23:12 +02:00
Lukas Wirth
db04f514f2
Lift out workspace related data into a separate query to preserve crategraph deduplication
2024-09-11 12:16:41 +02:00
Lukas Wirth
20f7ab5ab4
fix: Always explicitly set trait ref self types when lowering
2024-09-06 14:06:41 +02:00
Lukas Wirth
188c577855
Newtype ErasedFileAstId
2024-08-05 13:46:47 +02:00
Lukas Wirth
fcb88832de
Simplify FileDelegate
2024-08-05 13:03:03 +02:00
Lukas Wirth
7beac14cba
Internal: Cleanup proc-macro error handling
2024-07-26 14:38:19 +02:00
Lukas Wirth
40bbc684ad
Prefer standard library paths over shorter extern deps re-exports
2024-07-21 09:14:17 +02:00
Lukas Wirth
5264f86242
Encode edition within FileId in the hir layer
2024-07-18 08:49:10 +02:00
Lukas Wirth
2346a80ab4
Remove Name::to_smol_str
2024-07-16 12:43:58 +02:00
Lukas Wirth
df5f1777b8
More symbol usage
2024-07-16 12:05:16 +02:00
Lukas Wirth
c30bdfcc84
Use symbol in cfg
2024-07-16 10:41:42 +02:00
Lukas Wirth
93024ad411
Switch token trees to use Symbols
2024-07-16 10:11:59 +02:00
Hamir Mahal
7c34eb3880
style: simplify string interpolation
2024-05-30 16:18:49 -07:00
Lukas Wirth
a268eaf053
fix: Correctly handle no_core
/no_std
for preludes
2024-05-02 10:50:28 +02:00
Lukas Wirth
cdb8c3a327
Fix tests being non-deterministic
2024-04-19 13:22:00 +02:00
Lukas Wirth
83370fe5d7
Use Edition::CURRENT
2024-04-14 15:30:29 +02:00
Lukas Wirth
f3567bb604
Arc CrateData::cfg_options
2024-04-06 13:55:10 +02:00
Lukas Wirth
8e324e98a1
Rename ProcMacroKind::FuncLike to Bang
2024-03-22 11:20:56 +01:00
Lukas Wirth
255a8aef92
Move Edition into span crate
2024-03-21 10:21:44 +01:00
Laurențiu Nicola
717ba1d56a
Clippy fixes
2024-03-10 08:42:50 +02:00
bors
99a1b8f7a8
Auto merge of #16747 - Veykril:cleanup, r=Veykril
...
internal: Clean some stuff up
Just a bunch of small refactorings, mainly from browsing through `hir-def`
2024-03-04 10:30:17 +00:00
Lukas Wirth
4303e741de
Cleanup
2024-03-04 11:10:06 +01:00
mo8it
00a049b585
Avoid cloning deps
2024-02-29 17:01:32 +01:00