22486 Commits

Author SHA1 Message Date
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
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
7011fd054f
Merge pull request #19981 from Veykril/push-tzzunsrqqunv
fix: Do not force descend into derives for goto IDE features
2025-06-12 07:48:49 +00:00
Lukas Wirth
c8cedae2f9 fix: Do not force descend into derives for goto IDE features
Doing so can cause us to duplicate navigation targets for the same ranges which breaks convenience features of some editors where go to def can trigger find all references
2025-06-12 09:37:45 +02:00
Lukas Wirth
13494f4cac ItemTree's ItemVisibilities has no identity, so deduplicate 2025-06-12 09:14:43 +02:00
Lukas Wirth
c15fc9a344
Merge pull request #19837 from ChayimFriedman2/stable-astid
Provide better incrementality when items are changed
2025-06-12 06:09:01 +00:00
Chayim Refael Friedman
9a1063f266 LRU ast id map
We can do that and it's pretty heavy.
2025-06-12 08:50:43 +03: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
Lukas Wirth
2095af26ad
Merge pull request #19942 from ChayimFriedman2/faux
fix: Fix completion with some attribute macros
2025-06-12 05:44:34 +00:00
David Barsky
210c71eac5 hir-ty: test (the absence of) incremental trait solving 2025-06-11 12:12:58 -04:00
Lukas Wirth
f7b7db8b8c
Merge pull request #19973 from Veykril/push-ppltxvqvqmkk
fix: Hide dyn inlay hints for incomplete `impl`s
2025-06-11 10:01:01 +00:00
Lukas Wirth
4cf958cfd4 fix: Hide dyn inlay hints for incomplete impls 2025-06-11 11:49:44 +02:00
Chayim Refael Friedman
8ca5ad6bdd Fix proc macro server handling of strings with minuses
It used to decompose them thinking they were numbers.
2025-06-11 01:03:35 +03:00
Chayim Refael Friedman
9c3476d225
Merge pull request #19964 from Wilfred/fix_typos
[minor] Fix typos
2025-06-10 12:32:44 +00:00
Wilfred Hughes
e7ae13368b [minor] Fix typos 2025-06-10 13:22:03 +01:00
Lukas Wirth
f15267aaf4
Merge pull request #19963 from ChayimFriedman2/unsized-impl-items
fix: Do not error at impls for unsized types that do not include `where Self: Sized` items
2025-06-10 11:37:30 +00:00
Chayim Refael Friedman
6f4a6d4349 Do not error at impls for unsized types that do not include where Self: Sized items 2025-06-10 14:04:21 +03:00
David Barsky
bf6d445810
Merge pull request #19930 from regexident/dyn-semantics-take-two
Make `Semantics<'db, DB>` support `Semantics<'db, dyn HirDatabase>`, take two
2025-06-09 18:18:49 +00:00
Laurențiu Nicola
273514a9fb Merge from rust-lang/rust 2025-06-09 15:44:40 +03:00
Chayim Refael Friedman
14cb64c9d9 Stabilize the "JSON is not Rust" diagnostic 2025-06-09 00:35:40 +03:00
Chayim Refael Friedman
7b64b407e8 Correctly handle attr macros placed in cfg_attr in speculative expansion 2025-06-08 01:44:14 +03:00
Chayim Refael Friedman
cc50868148 Remove the optimization of builtin attrs in is_inside_macro_call()
`#[cfg_attr]` is a builtin attr, but it may still contain a macro.
2025-06-08 01:07:55 +03:00
Vincent Esche
1a3feeebc4 Make Semantics<'db, dyn HirDatabase> actually usable 2025-06-06 09:45:34 +02:00
Lukas Wirth
6acff6c1f8
Merge pull request #19908 from rmehri01/rmehri01/diagnostic_attribute_completions
feat: implement attribute completions for diagnostics module
2025-06-06 07:19:13 +00:00
Lukas Wirth
4fd1cdb3e3
Merge pull request #19937 from Veykril/push-rvnylnlnxxyr
fix: Record macro calls for fields in `ChildBySource` impls
2025-06-06 05:45:48 +00:00
Lukas Wirth
cad9cc97e2
Merge pull request #19935 from ChayimFriedman2/exp-diag-show-quickfix
fix: Always include quickfixes for diagnostics, even when diagnostics are disabled
2025-06-06 05:35:52 +00:00
Lukas Wirth
8e217cc68a fix: Record macro calls for fields in ChildBySource impls 2025-06-06 07:34:42 +02:00
Chayim Refael Friedman
41f5de12bd Stabilize unlinked file diagnostic 2025-06-06 03:55:57 +03:00
Chayim Refael Friedman
869714aae0 Always include quickfixes for diagnostics, even when diagnostics are disabled 2025-06-06 03:52:32 +03:00
Lukas Wirth
d5665e5ca7
Merge pull request #19933 from Veykril/push-uyxorpyvnzsl
Better parser recovery for macro calls in type bound position
2025-06-05 14:23:04 +00:00
Lukas Wirth
5d3001795a Better parser recovery for macro calls in type bound position 2025-06-05 16:11:30 +02:00
Lukas Wirth
bb5e6deff5 fix: Record macro calls in signatures in ChildBySource impls 2025-06-05 15:04:50 +02:00
Paolo Barbolini
69f077653a Stabilize const_eq_ignore_ascii_case 2025-06-05 07:09:16 +00:00
Lukas Wirth
634596e2d7
Merge pull request #19928 from Veykril/push-kznpuqllrvvq
Deduplicate code in proc-macro-srv
2025-06-05 05:36:01 +00:00
Lukas Wirth
02a788bfaa Deduplicate code in proc-macro-srv 2025-06-05 07:25:15 +02:00
Ryan Mehri
b95101ce46 add qualifiers to attribute completions 2025-06-04 11:02:48 -04:00
Ryan Mehri
f1cc7c5c92 match on segments of path and some small cleanup 2025-06-04 08:30:27 -04:00
Lukas Wirth
b94e766791 refactor: Cleanup descension stuff 2025-06-04 12:32:02 +02:00
Lukas Wirth
2dc5aa885a
Merge pull request #19922 from Veykril/push-oxyomxrsplpx
feat: Add `dyn` keyword inlay hints
2025-06-04 09:51:22 +00:00
Lukas Wirth
b9733810bb feat: Add dyn keyword inlay hints 2025-06-04 11:40:05 +02:00