Commit graph

273911 commits

Author SHA1 Message Date
Chayim Refael Friedman
ca0c8da517 Generate a method for static retrieval of the SyntaxKind of a node, where possible
This will help for the quote macro for `ast::make`.
2024-12-30 03:13:17 +02:00
Lukas Wirth
259eaf9c90
Merge pull request #18789 from Veykril/push-sypxzqsvmzzp
fix: Fix invalid `-O` flag used by cfg discovery
2024-12-29 15:18:32 +00:00
Lukas Wirth
7f757b96f5 fix: Fix invalid -O flag used by cfg discovery 2024-12-29 16:04:17 +01:00
Lukas Wirth
b570206ca4
Merge pull request #18785 from Veykril/push-uvsqposqyvmo
Cleanup toolchain info fetching
2024-12-29 12:57:31 +00:00
Lukas Wirth
bde1322b90
Merge pull request #18787 from Veykril/push-uymlpukspxqr
Automatically cancel CI checks on new push to same PR
2024-12-29 12:55:40 +00:00
Lukas Wirth
f36a93ec52 Inline toolchain_info module 2024-12-29 13:43:12 +01:00
Lukas Wirth
3d9a15bbf9 Automatically cancel CI checks on new push to same PR 2024-12-29 13:41:22 +01:00
Lukas Wirth
d3ebb1469c
Merge pull request #18774 from Veykril/push-ysppqxpuknnw
Implement parameter variance inference
2024-12-29 12:34:48 +00:00
Lukas Wirth
d105253194 Force a current dir to be supplied for rustc info fetching 2024-12-29 13:26:04 +01:00
Lukas Wirth
a4a6a43000 Split out ProjectWorkspace::load_cargo 2024-12-29 12:54:41 +01:00
Lukas Wirth
8606441fcc Enforce a current directory being set for spawned commands 2024-12-29 12:51:13 +01:00
Lukas Wirth
d5f7e78f69 Cleanup toolchain info fetching 2024-12-29 12:25:51 +01:00
Lukas Wirth
0337e79c5c
Merge pull request #18784 from Veykril/push-pqtwsvquxoty
fix: Do not merge spans if they have different anchors
2024-12-29 10:44:04 +00:00
Lukas Wirth
1f0696de43 fix: Do not merge spans if they have different anchors 2024-12-29 11:29:32 +01:00
Lukas Wirth
54b75a1479
Merge pull request #18779 from ChayimFriedman2/enum-variant
fix: Consider `Enum::Variant` even when it comes from a different crate
2024-12-29 09:58:16 +00:00
Lukas Wirth
a102ea1c2d Describe variance resolution approach differences to rustc 2024-12-29 10:53:17 +01:00
Chayim Refael Friedman
30fa18c44f Consider Enum::Variant even when it comes from a different crate 2024-12-28 22:43:51 +02:00
Lukas Wirth
bf27d88616 Show variance of parameters on hover 2024-12-28 20:31:20 +01:00
Lukas Wirth
e54cf80b98 Simplify 2024-12-28 19:54:22 +01:00
Lukas Wirth
d66a337658 Get rid of constrain and solve steps 2024-12-28 19:54:22 +01:00
Lukas Wirth
0e50c3c81b Remove unnecessary VarianceTerm 2024-12-28 19:54:22 +01:00
Lukas Wirth
4ea29d619c Implement parameter variance inference 2024-12-28 19:54:22 +01:00
Lukas Wirth
47f497d636
Merge pull request #18778 from Veykril/push-oontvoqmxkno
fix: Fix flycheck diagnostics flickering for binary targets
2024-12-28 17:31:11 +00:00
Lukas Wirth
873cf255de Add DynTyExt::principal_id 2024-12-28 18:26:45 +01:00
Lukas Wirth
73ae6a0ba8 Downgrade salsa log levels 2024-12-28 18:23:24 +01:00
Lukas Wirth
171be2bd58 fix: Fix flycheck diagnostics flickering for binary targets 2024-12-28 18:16:55 +01:00
Laurențiu Nicola
8d8b42df66
Merge pull request #18770 from Erithax/patch-1
fix doc typo
2024-12-27 22:28:38 +00:00
Erithax
b2531ba7a6
fix doc typo 2024-12-27 23:13:09 +01:00
Lukas Wirth
eea4a9ab9e
Merge pull request #18744 from gbbosak/master
Treat ; as a terminator rather part of a glued expression
2024-12-27 09:57:02 +00:00
Lukas Wirth
352116ce97
Merge pull request #18762 from davidbarsky/davidbarsky/wrap-salsa-cancellation-error
internal: wrap `salsa::Cycle`
2024-12-26 15:42:53 +00:00
Lukas Wirth
bae8fb5c80
Merge pull request #18761 from Veykril/push-vktnzltnxupr
internal: Swallow `error: config value is not set` cargo error
2024-12-26 15:28:24 +00:00
David Barsky
637700e974 internal: wrap salsa::Cycle 2024-12-26 10:26:42 -05:00
Lukas Wirth
5290f20f08 internal: Swallow error: config value is not set cargo error 2024-12-26 16:13:39 +01:00
Lukas Wirth
ec5e4855cc
Merge pull request #18760 from Veykril/push-tkvlvvqyszrs
internal: Workaround salsa cycles leaking
2024-12-26 14:09:49 +00:00
Lukas Wirth
27dd75d93c internal: Workaround salsa cycles leaking 2024-12-26 14:55:20 +01:00
Lukas Wirth
022bece913
Merge pull request #18756 from roife/fix-18751
fix missing name enum when hovering on fields in variants
2024-12-25 05:54:21 +00:00
roife
9e7d29688f fix missing name enum when hovering on fields in variants 2024-12-25 07:28:26 +08:00
Lukas Wirth
96f068c169
Merge pull request #18755 from Veykril/push-psllyxqtywzs
fix: Fix metrics workflow using the wrong download-artifact version
2024-12-24 18:14:12 +00:00
Lukas Wirth
1287b9362e fix: Fix metrics workflow using the wrong download-artifact version 2024-12-24 18:59:49 +01:00
Lukas Wirth
6d10170a07
Merge pull request #18743 from ChayimFriedman2/e0107
feat: Unify handling of path diagnostics in hir-ty
2024-12-24 17:13:07 +00:00
Lukas Wirth
9c554620c2
Merge pull request #18754 from Veykril/push-zkkzxrsxnqnm
Cleanup target fetching for cargo metadata
2024-12-24 17:03:31 +00:00
Chayim Refael Friedman
9d44ee1312 Unify handling of path diagnostics in hir-ty
Because it was a mess.

Previously, pretty much you had to handle all path diagnostics manually: remember to check for them and handle them. Now, we wrap the resolver in `TyLoweringContext` and ensure proper error reporting.

This means that you don't have to worry about them: most of the things are handled automatically, and things that cannot will create a compile-time error (forcing you top `drop(ty_lowering_context);`) if forgotten, instead of silently dropping the diagnostics.

The real place for error reporting is in the hir-def resolver, because there are other things resolving, both in hir-ty and in hir-def, and they all need to ensure proper diagnostics. But this is a good start, and future compatible.

This commit also ensures proper path diagnostics for value/pattern paths, which is why it's marked "feat".
2024-12-24 18:58:52 +02:00
Lukas Wirth
4be8178a76 Cleanup target fetching for cargo metadata 2024-12-24 17:49:07 +01:00
Lukas Wirth
8bfb2fe018
Merge pull request #18707 from ChayimFriedman2/subst
feat: Show substitution where hovering over generic things
2024-12-24 14:16:16 +00:00
Lukas Wirth
eb80a6bd48
Merge pull request #18718 from Giga-Bowser/fix-syntaxfactory-intoiterator
internal: Standardize how we take iterator parameters in `SyntaxFactory`
2024-12-24 14:12:52 +00:00
Lukas Wirth
b3308bce33
Merge pull request #18722 from markmurphydev/status_bar_settings
Rename `rust-analyzer.statusBar.documentSelector` to `showStatusBar`, add "always" and "never" options.
2024-12-24 14:12:32 +00:00
Lukas Wirth
a63d166eeb
Merge pull request #18750 from Veykril/push-tyvtqpwrwvsr
Back out "internal: Disable rustc test metrics"
2024-12-24 09:52:37 +00:00
Lukas Wirth
9251d422b8 Back out "internal: Disable rustc test metrics"
This backs out commit d9a08624aa.
2024-12-24 10:37:24 +01:00
Lukas Wirth
91fb189652 Remove dangling outdated test module 2024-12-24 10:37:24 +01:00
Lukas Wirth
417dcc4143
Merge pull request #18749 from PrototypeNM1/windows-debugger-wait
minor: Break out of waiting for debugger on Windows using native debugger check API.
2024-12-24 08:40:56 +00:00