2978 Commits

Author SHA1 Message Date
Lukas Wirth
e464ff8c75
Merge pull request #19687 from gohome001/highlight_unsafe
feat: highlight unsafe operations
2025-05-18 08:44:10 +00:00
gohome001
c6e3a4cf20 minor: code review tweak 2025-05-10 13:16:34 +08:00
Hayashi Mikihiro
0235ff883f extract function: doc_attributes to find def from inner doc
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 03:12:19 +09:00
Hayashi Mikihiro
cc0e3acd91 add doc link test for hover
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 00:36:52 +09:00
Hayashi Mikihiro
318185720c add doc link test for goto def
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 00:36:42 +09:00
Hayashi Mikihiro
778322eb31 check module path inner or outer
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 00:36:17 +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
581646236e refactor: De-arc defmap queries 2025-05-05 09:04:52 +02:00
Lukas Wirth
235d88bf42 Render more lifetimes 2025-05-02 14:36:18 +02:00
Lukas Wirth
7d9b839f9c refactor: Clean up cache priming cancellation handling 2025-04-29 10:40:31 +02:00
Lukas Wirth
6355df9c57 refactor: De-arc lang item queries 2025-04-28 17:17:39 +02: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
gohome001
1d4602e2b0 minor: format 2025-04-25 17:02:08 +08:00
gohome001
e525239877 test: add test case for highlight unsafe operations 2025-04-25 16:06:48 +08:00
gohome001
0d1743a890 feat: highlight unsafe operations 2025-04-25 16:06:48 +08:00
Lukas Wirth
4e4aee41c9
Merge pull request #19647 from roife/fix-issue-19646
fix: panics in inlay hints that produce empty text edits for closure return types
2025-04-22 16:27:28 +00:00
roifewu
97fa2a73ea fix: panics in inlay hints that produce empty text edits for closure return types 2025-04-23 00:01:35 +08:00
Lukas Wirth
1c68d83569
Merge pull request #19657 from ChayimFriedman2/better-offset-of
feat: Better support `offset_of!()`
2025-04-22 13:28:34 +00:00
Chayim Refael Friedman
8d824c7828 Resolve offset_of!() in IDE 2025-04-22 00:33:06 +03:00
Lukas Wirth
34e7d60e30
Merge pull request #19644 from ChayimFriedman2/const-syms
internal: Make predefined symbols `const` instead of `static`
2025-04-21 12:34:59 +00:00
roifewu
06cf9ca521 minor: simplify and enhance notable traits rendering 2025-04-21 19:03:35 +08: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
150bb4a00f
Merge pull request #19617 from ChayimFriedman2/more-actual
internal: Make `HirFileId`, `EditionedFileId` and macro files Salsa struct
2025-04-19 19:21:53 +00: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
Lukas Wirth
a09a5502c3
Merge pull request #19613 from ChayimFriedman2/subst
fix: Fix a panic when a trait method in an impl declares a lifetime parameter not in the trait declaration
2025-04-18 18:51:14 +00:00
Chayim Refael Friedman
41227f01d2 Sort notable traits in hover
Previously it was ordered by what accidentally happened to be the crate graph order, which isn't sensible, plus it caused changes when any change was done to salsa IDs.
2025-04-18 12:45:22 +03:00
Chayim Refael Friedman
346f2d7559 Fix a panic when a trait method in an impl declares a lifetime parameter not in the trait declaration
Shuffle the code a bit.
2025-04-18 06:28:17 +03:00
Lukas Wirth
71d23b9a6b
Merge pull request #19612 from ChayimFriedman2/parent-generics
fix: Fix a bug with predicate lowering of associated items
2025-04-17 08:17:26 +00:00
Chayim Refael Friedman
e1962d2e22 Fix a bug with predicate lowering of associated items
The essence of the bug is that bounds on `impl Trait` got lowered with incorrect bound vars, as if we were lowering the parent.
2025-04-17 00:19:54 +03:00
Lukas Wirth
1748a84888
Merge pull request #19589 from roife/fix-issue-19138
fix: highlighting for tail expr in labelled blocks
2025-04-16 11:20:05 +00:00
roifewu
cfc28f3148 feat: highlight tail expr when cursor is on label 2025-04-16 19:08:44 +08:00
roifewu
727d4b184d feat: enhance signature help to display generic parameters for callables and default values for generic args 2025-04-16 02:41:08 +08:00
roifewu
78503f2d1f feat: highlight tail expression in labeled block 2025-04-15 12:58:38 +08:00
Chayim Refael Friedman
cdc5ba30fc Prevent panics when there is a cyclic dependency between closures
We didn't include them in the sorted closures list, therefore didn't analyze them, then failed to find them.
2025-04-14 07:12:51 +03:00
Lukas Wirth
40076b577f internal: Render sigantures with view hir command 2025-04-13 12:13:28 +02:00
Chayim Refael Friedman
96925d5105
Merge pull request #19570 from ChayimFriedman2/fix-store-panic
fix: Fix an incorrect `ExpressionStore` that was passed
2025-04-10 21:46:18 +00:00
Chayim Refael Friedman
8bde16dcce Fix an incorrect ExpressionStore that was passed
It caused panics everywhere.
2025-04-11 00:34:13 +03:00
Lukas Wirth
f880acd18c
Merge pull request #19461 from Hmikihiro/shadow_by_module
fix: shadow type by module
2025-04-10 12:20:14 +00:00
Chayim Refael Friedman
8a9a1e3345 Remove all upcasts!
It turns out there were a lot redundant too.
2025-04-10 11:08:38 +03:00
Hayashi Mikihiro
2854ad9a41 fix: shadow type by module
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
David Barsky
99a2b676bc internal: rename children_modules to child_modules 2025-04-09 12:43:49 -04:00
Lukas Wirth
f4747f2617
Merge pull request #19255 from geetanshjuneja/master
Add children modules feature
2025-04-09 09:53:25 +00:00
Lukas Wirth
dc363f7f77
Merge pull request #19462 from Veykril/push-ypvprvvwkyll
refactor: Lower type-refs before type inference
2025-04-09 08:54:28 +00: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
Ralf Jung
4b60f361a4 make hover_feature test less fragile 2025-04-08 12:13:17 +02:00
Lukas Wirth
fa53aab6f1
Merge pull request #19541 from Veykril/push-twqrorwqzmwv
fix(auto-import): Prefer imports of matching types for argument lists
2025-04-08 07:32:52 +00:00
Lukas Wirth
7255ef1375 fix(auto-import): Prefer imports of matching types for argument lists 2025-04-08 09:21:32 +02:00