2990 Commits

Author SHA1 Message Date
Lukas Wirth
e65dddaf59
Merge pull request #19861 from vremyavnikuda/docs/find-all-refs-constructor-search
docs: add documentation for find_all_refs constructor search
2025-05-30 06:45:28 +00:00
vremyavnikuda
b71e8fadf5 docs:deleting duplicate documentation 2025-05-28 22:17:29 +07:00
Lukas Wirth
5900e25edc
Merge pull request #19880 from Veykril/push-xmpxumsrkymk
fix: Handle included files better in IDE layer
2025-05-28 08:49:42 +00:00
Lukas Wirth
e72738de99 fix: Handle included files better in IDE layer
This does not fully fix things, but it introduces a function that can be used to fix occurences.
When using `to_def` functionality, the input node needs to come from the macro expanded include, not the real file that was included.
This does unfortunately add more caller burden, but there is not really a way around it.
2025-05-28 10:38:38 +02:00
Lukas Wirth
c44372d06c
Merge pull request #19876 from ShoyuVanilla/layout-padding
feat: Render padding information when hovering on structs
2025-05-28 08:16:38 +00:00
Shoyu Vanilla
e806957098 feat: Render padding information when hovering on structs 2025-05-28 14:18:50 +09:00
Lukas Wirth
bbbcfaab8b fix: Fix IDE layer not resolving some macro calls 2025-05-28 06:58:40 +02:00
vremyavnikuda
a2b58e216d fix: formated to clippy 2025-05-26 16:41:49 +07:00
vremyavnikuda
8dd930390b fix: the lines are formatted according to clippy 2025-05-26 16:00:45 +07:00
vremyavnikuda
0902094d01 fix: the lines are formatted according to clippy 2025-05-26 15:51:50 +07:00
vremyavnikuda
82edbbcd2a docs: add documentation for find_all_refs constructor search (#10725) 2025-05-26 15:51:50 +07:00
Chayim Refael Friedman
87529e8631 Properly implement might_be_inside_macro_call() using semantic information instead of syntactical hacks
And rename it to `is_inside_macro_call()` accordingly.
2025-05-25 20:15:58 +03:00
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