Chayim Refael Friedman
89c0ffa6b0
Build source map for hir_def::TypeRef
s
...
So that given a `TypeRef` we will be able to trace it back to source code.
This is necessary to be able to provide diagnostics for lowering to chalk tys, since the input to that is `TypeRef`.
This means that `TypeRef`s now have an identity, which means storing them in arena and not interning them, which is an unfortunate (but necessary) loss but also a pretty massive change. Luckily, because of the separation layer we have for IDE and HIR, this change never crosses the IDE boundary.
2024-10-25 06:15:04 +03:00
David Barsky
ccee36e8dd
chore: rename salsa to ra_salsa
2024-10-14 10:09:22 -04:00
bors
518532426d
Auto merge of #17863 - Veykril:include-diags, r=Veykril
...
fix: Resolve included files to their calling modules in IDE layer
Fixes https://github.com/rust-lang/rust-analyzer/issues/17390 at the expense of reporting duplicate diagnostics for modules that have includes in them when both the calling and called file are included.
2024-08-12 11:48:32 +00:00
Lukas Wirth
2362975137
Resolve included files to their calling modules in IDE layer
2024-08-12 13:45:33 +02:00
Shoyu Vanilla
c530e21714
feat: Implement TAIT
2024-08-10 15:22:05 +09:00
Lukas Wirth
bd359b32b0
LRU body_with_source_map
query
2024-07-22 16:34:59 +02:00
Lukas Wirth
5264f86242
Encode edition within FileId in the hir layer
2024-07-18 08:49:10 +02:00
Lukas Wirth
93024ad411
Switch token trees to use Symbols
2024-07-16 10:11:59 +02:00
Lukas Wirth
f2d51073d2
Use statics + clone instead of const until const can access statics
2024-07-14 17:52:59 +02:00
Lukas Wirth
3fe815b0f3
Use Symbol in Name
2024-07-12 16:06:44 +02:00
Lukas Wirth
e052b3e9a6
Intern ModPath within RawVisibility
2024-06-24 10:07:32 +02:00
Lukas Wirth
5548aecdca
Save a bit on empty item trees by deduplicating them
2024-06-24 10:07:32 +02:00
Lukas Wirth
6f0207d594
Cleanup some inert attribute stuff
2024-06-04 12:38:20 +02:00
Lukas Wirth
531a270d91
Generally optimize diagnostics performance
2024-04-15 22:15:41 +02:00
Lukas Wirth
94e38261b3
Optimize exhaustiveness checking perf a bit
2024-04-15 19:35:48 +02:00
Lukas Wirth
3b1ad2379d
internal: Make def site span for proc-macro more invalidation resistant
2024-03-15 10:14:00 +01:00
Lukas Wirth
d085ade631
Remove dead test code
2024-03-14 16:24:51 +01:00
Lukas Wirth
d2f8eae2ec
feat: Support macro calls in eager macros for IDE features
2024-03-14 15:40:35 +01:00
Lukas Wirth
a3b6e891ea
Add tracing spans to macro generated database
2024-03-06 20:19:36 +01:00
David Barsky
e1ea7c8844
internal: switch to tracing
from log
...
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
bors
22b6f9679d
Auto merge of #16439 - wasd96040501:feat/gotodef3, r=Veykril
...
feat: Support for GOTO def from *inside* files included with include! macro
close #14937
Try to implement goto def from *inside* files included with include! macro.
This implementation has two limitations:
1. Only **one** file which calls include! will be tracked. (I think multiple file be included is a rare case and we may let it go for now)
2. Mapping token from included file to macro call file (semantics.rs:646~658) works fine but I am not sure is this the correct way to implement.
2024-01-30 11:27:18 +00:00
YangzeLuo
b22e772cab
feat: Support for GOTO def from *inside* files included with include! macro
2024-01-27 23:36:01 +08:00
Lukas Wirth
e320004dad
Remove tt -> ast -> tt round trips in attrs lowering
2024-01-26 19:28:39 +01:00
Johann Hemmann
add40c8660
match_like_matches_macro
2024-01-19 17:31:01 +01:00
Lukas Wirth
82e8355492
feat: Show notable trait impls on hover
2024-01-16 19:17:33 +01:00
Lukas Wirth
8f4f5a6cce
fix: Make value_ty query fallible
2024-01-16 12:09:40 +01:00
Lukas Wirth
54f2111f69
internal: Make data queries transparent over their diagnostics variant
2024-01-16 10:47:54 +01:00
Lukas Wirth
1669344b2a
Thinner DefDiagnostics
2024-01-15 11:07:26 +01:00
Lukas Wirth
2d72ec71ec
Deduplicate
2024-01-15 10:58:05 +01:00
Lukas Wirth
d80d2fcae0
Eagerly lower enum variants in CrateDefMap construction
2024-01-15 10:24:14 +01:00
Lukas Wirth
4e16e0f2c1
Don't allocate DefDatabase::crate_lang_items
if its empty
2024-01-09 21:06:21 +01:00
Lukas Wirth
9673915045
Make DefDatabase::lang_attr
transparent
2024-01-09 20:52:10 +01:00
Lukas Wirth
9d24764624
internal: Cleanup Expander a bit
2023-12-22 13:01:13 +01:00
Lukas Wirth
5bdb479131
fix: Fix span marking for builtin fn macros
2023-12-21 16:20:27 +01:00
Lukas Wirth
1e1113cf5f
Correctly set and mark the proc-macro spans
2023-12-21 10:51:54 +01:00
Lukas Wirth
7d762d18ed
Record macro def site spans
2023-12-21 09:54:47 +01:00
Lukas Wirth
51a9e7831a
Rename some things and turn macro to macro def into a query
2023-12-21 09:18:25 +01:00
Lukas Wirth
bfad781a77
Memoize block_item_tree_query
2023-08-10 19:24:39 +02:00
Lukas Wirth
e5b23e3bc1
Derive block attributes from block item tree
2023-08-10 18:52:27 +02:00
Lukas Wirth
f86f6a89eb
Change terminology, do not name use items and use trees as imports
2023-08-02 14:19:38 +02:00
hkalbasi
4a444e768c
Implement recursion in mir interpreter without recursion
2023-07-07 15:07:29 +03:30
Lukas Wirth
9476fdaaa9
HIR ExternCrateDecl
2023-06-19 14:15:08 +02:00
Lukas Wirth
0bde3fc77e
Intern use and extern crate items like other items
2023-06-19 13:51:44 +02:00
Lukas Wirth
abe249559d
internal: Give ConstBlockId and InTypeConstId named Location types
2023-06-12 18:21:17 +02:00
hkalbasi
a4695788ca
Add a bunch of fixme comments
2023-06-12 00:37:11 +03:30
hkalbasi
f8594f78bb
Use ConstArg
instead of Expr
for AstId
of InTypeConstId
2023-06-11 00:39:28 +03:30
hkalbasi
d9136df9e5
Handle return types for in type const bodies
2023-06-11 00:39:28 +03:30
hkalbasi
a481e004b0
Lower const params with a bad id
2023-06-11 00:39:28 +03:30
Lukas Wirth
dc7c6d43c7
Slightly shrink DefMap
2023-06-01 14:46:36 +02:00
hkalbasi
cbcafd3539
MIR episode 5
2023-05-12 18:17:15 +03:30