Lukas Wirth
02a793bd59
chore: Remove legacy SyntaxContextId
re-export
2025-03-15 17:09:17 +01:00
David Barsky
788232b355
internal: don't panic when the crate graph isn't ready #19351
2025-03-13 15:14:08 -04:00
Chayim Refael Friedman
c94e9efbef
Salsify the crate graph
...
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-12 21:02:30 +02:00
David Barsky
74620e64ec
internal: port rust-analyzer to new Salsa
2025-03-10 13:30:51 -04:00
Lukas Wirth
5a742d3da9
Merge pull request #19326 from Veykril/push-vovuxzkzrowp
...
Add missing name-ref parents to syntactic highlighting
2025-03-10 11:47:15 +00:00
Lukas Wirth
7ae98626fc
Add missing name-ref parents to syntactic highlighting
2025-03-10 12:31:38 +01:00
Lukas Wirth
f81fcabdf9
Merge pull request #19332 from Veykril/push-trvznlqsvtyq
...
Make change annotations per text-edit
2025-03-10 11:25:13 +00:00
Lukas Wirth
70066399f0
Make change annotations per text-edit
2025-03-10 12:08:42 +01:00
Lukas Wirth
27a5b1ba0c
Merge pull request #19330 from ChayimFriedman2/normalize-projection
...
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10 09:15:35 +00:00
Chayim Refael Friedman
62e7d2851b
Warn the user when a rename will change the meaning of the program
...
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it.
We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06 21:07:10 +02:00
Chayim Refael Friedman
422213cc9a
Use correct crate for trait env in render_const_scalar()
2025-03-06 21:00:08 +02:00
Chayim Refael Friedman
2fc0dc0f13
Pass the target crate in HirFormatter
...
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-06 21:00:05 +02:00
Chayim Refael Friedman
1cd9e683e8
Normalize projections in evaluated const display and layout calculation
2025-03-06 20:55:50 +02:00
Lukas Wirth
94915fbe48
Fix syntax highlightingg punct filtering ignoring mods
2025-03-05 15:02:44 +01:00
Lukas Wirth
27dc614627
Merge pull request #19274 from Veykril/push-pouwrwwrlrlt
...
Highlight unsafe operations as unsafe, not definitions
2025-03-05 12:57:25 +00:00
Lukas Wirth
9fc0ffe008
Use HIR unsafety information for unsafe syntax highlightng
2025-03-05 13:18:46 +01:00
Thalia Archibald
0811ca0a61
Use size_of from the prelude instead of imported
...
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the
prelude instead of importing or qualifying them.
These functions were added to all preludes in Rust 1.80.
2025-03-05 00:48:44 -08:00
Lukas Wirth
76567ee28d
Merge pull request #19251 from Veykril/push-tkmpqtzxynxk
...
Remove syntax editing from parenthesis computation
2025-03-01 17:46:07 +00:00
Lukas Wirth
570c6adcd3
Remove syntax editing from parenthesis computation
2025-03-01 18:32:04 +01:00
Lukas Wirth
716e9fdb8d
Fix test_keyword_highlighting
test
2025-03-01 18:29:47 +01:00
Lukas Wirth
8f319240b4
Cleanup string handling in syntax highlighting
2025-03-01 17:44:29 +01:00
Lukas Wirth
9200f77068
More precise macro modifiers for syntax highlighting
2025-03-01 17:23:51 +01:00
Lukas Wirth
487d682204
Cleanup highlighting macro-def handling
2025-03-01 16:54:40 +01:00
Lukas Wirth
e92dc3fd80
Have inline_local_variable use precedence calculation for parentheses
2025-02-28 11:03:33 +01:00
Lukas Wirth
2c4ef382d6
Merge pull request #19249 from Veykril/push-noosrywrsuvn
...
Fix prefix adjustment hints unnecessarily introducing parens
2025-02-28 09:33:36 +00:00
Lukas Wirth
f655062cb0
Fix prefix adjustment hints unnecessarily introducing parens
2025-02-28 10:18:10 +01:00
Nicholas Crothers
15207a0474
Add anchor for intra-doc links to associated items
2025-02-27 16:39:07 -06:00
BenjaminBrienen
bd7375a58f
enable doctest
2025-02-27 14:58:46 +01:00
Lukas Wirth
93bd36dfb9
Merge pull request #18987 from ChayimFriedman2/drop-glue
...
feat: Calculate drop glue and show it on hover
2025-02-24 13:52:17 +00:00
andylokandy
03c24d7c28
feat: update insta inline snapshot when clicks 'Update Test' runnable
2025-02-21 21:18:20 +08:00
Mehul Arora
3a31741627
Use correct working directory for non-workspace proc-macro execution
2025-02-17 10:36:32 -05:00
Lukas Wirth
09db657439
Merge pull request #19127 from ChayimFriedman2/different-generic-args
...
feat: Refactor path lowering and serve a new path diagnostic
2025-02-17 08:30:10 +00:00
Chayim Refael Friedman
100e166bb1
Calculate drop glue and show it on hover
...
Also fix the `needs_drop()` intrinsic.
Unions also need this information (to err if they have a drop-needing field), but this will come in a follow-up PR.
2025-02-17 06:29:37 +02:00
Chayim Refael Friedman
353616be8b
Fix sorting of runnables
...
There were two mistakes: first, tests were sorted before test modules, and second, we re-sorted based on the name only, which cancelled the sort based on the kind.
2025-02-17 03:03:29 +02:00
Chayim Refael Friedman
55c04ab371
Refactor path lowering
...
And add a new diagnostic for non-`Fn` parenthesized generic args.
Path lowering started to look like a mess, with each function carrying additional parameters for the diagnostic callback (since paths can occur both in type and in expression/pattern position, and their diagnostic handling is different) and the segment index, for the diagnostics report. So I refactored it from stateless functions on `TyLoweringContext` into stateful struct, `PathLoweringContext`, that tracks the process of lowering a path from resolution til assoc types selection.
2025-02-16 19:44:50 +02:00
Lukas Wirth
2b485d7f23
Merge pull request #19137 from asuto15/highlight-extern-crate
...
fix: highlight `extern crate` in doc comments
2025-02-16 14:07:07 +00:00
Lukas Wirth
1afbc220bc
fix: Stabilize sort order of related_tests
2025-02-16 13:18:47 +01:00
Lukas Wirth
e0d1fba739
fix: Stabilize sort order of runnables
2025-02-16 12:22:26 +01:00
asuto15
c14140ab8b
fix: remove unnecessary conversion
2025-02-15 13:18:18 +09:00
asuto15
24a778f6c1
Delete library modifier to highlighting for extern crate
2025-02-15 12:06:21 +09:00
asuto15
22b1977840
Delete useless comma
2025-02-13 04:33:08 +09:00
asuto15
535338d8bb
Add modifiers to highlighting for extern crate
2025-02-13 03:58:20 +09:00
Lukas Wirth
8e81cc0772
Merge pull request #19109 from Veykril/push-nzpuuqommpnq
...
fix: Do not show safety hints for extern items lacking semantics
2025-02-12 13:58:56 +00:00
Lukas Wirth
e0814742f0
fix: Do not show safety hints for extern items lacking semantics
2025-02-12 14:43:51 +01:00
gohome001
d3d455d4fb
minor: don't show drop hints for other pattern
2025-02-12 17:18:42 +08:00
Chayim Refael Friedman
8aa4ae5e69
Merge pull request #19117 from gohome001/implicit-drop-inlay-hints-bug
...
Fix: don't emit implicit drop inlay hints for macro
2025-02-11 13:18:04 +00:00
gohome001
42f11d49ee
add test case for ignoring inlay hint for macro call
2025-02-11 15:27:34 +08:00
gohome001
55dbf3949d
don't emit implicit drop inlay hints for macro
2025-02-11 15:24:46 +08:00
asuto15
de77d7f661
Fix highlighting for extern crate in doc comments
2025-02-11 15:06:56 +09:00
Hayashi Mikihiro
c84cec1547
Shadowing BuiltinType by Module
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-02-10 17:46:43 +09:00