22474 Commits

Author SHA1 Message Date
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
Lukas Wirth
7c3de05e3a Give path segment type anchors their own grammar rule 2025-06-04 11:40:05 +02:00
Lukas Wirth
d2164fe08b Remove unnecessary parameters in inlay-hint computation 2025-06-04 11:31:45 +02:00
David Barsky
98f32c1de1 hir-ty: add incremental tests checking for infer invalidation 2025-06-03 13:48:45 -04:00
Lukas Wirth
cf969d21c3
Merge pull request #19869 from MatrixFrog/publicize_field
Add a quickfix for accessing a private field of a struct
2025-06-03 06:11:28 +00:00
Lukas Wirth
ed2ae943bb
Merge pull request #19894 from ShoyuVanilla/some-query-cycles
fix: Cycle handlers for `HirDatabase::infer, const_param_ty_with_diagnostics`
2025-06-03 06:08:46 +00:00
Lukas Wirth
9edac77f48
Merge pull request #19901 from BazookaMusic/master
Enable Assist edit for tuple<->named struct for the struct and visiblity keywords
2025-06-03 06:07:39 +00:00
Tyler Breisacher
4055436776 Add a quickfix for accessing a private field of a struct 2025-06-02 22:45:34 -07:00
Shoyu Vanilla
fefe86732d fix: Cycle handlers for `HirDatabase::infer, const_param_ty_with_diagnostics 2025-06-03 10:39:38 +09:00
Ryan Mehri
7e8079fbad feat: implement completion for diagnostic module 2025-06-02 20:56:20 -04:00
BazookaMusic
34b31f174d simplify expression that checks the offset 2025-06-02 23:28:26 +02:00
Ryan Mehri
fb921c3039 fix: don't duplicate must_use for functions and traits 2025-06-02 15:35:13 -04:00
Lukas Wirth
9a786d0008 Support derive-macros for rename prefix magic 2025-06-02 15:27:13 +02:00