Commit Graph

19470 Commits

Author SHA1 Message Date
bors
2f872156fe Auto merge of #16808 - ShoyuVanilla:proc-macro-sem-token, r=Veykril
feat: Add proc macro semantic token type

Closes  #11529
2024-03-11 13:20:29 +00:00
Shoyu Vanilla
fc11216ad5 feat: Add proc macro semantic token type 2024-03-11 22:14:59 +09:00
bors
40ee359046 Auto merge of #16810 - Young-Flash:unused_var_fix, r=Veykril
feat: add fix for unused_variables

add a leading underscore for unused variable
2024-03-11 13:01:50 +00:00
bors
2320e12541 Auto merge of #16771 - Veykril:self-param-split, r=Veykril
internal: Don't desugar self param into a pattern

Small experiment to see if this simplifies things
2024-03-11 12:45:46 +00:00
Young-Flash
562f4a2688 test: update test for unused_variables 2024-03-11 19:36:53 +08:00
Young-Flash
77136575da feat: add fix for unused_variables 2024-03-11 19:36:53 +08:00
bors
a0dd822972 Auto merge of #16473 - SomeoneToIgnore:kb/remove-resolve-stub, r=Veykril
Stop eagerly resolving inlay hint text edits for VSCode

Send less json over the wire.
After https://github.com/microsoft/vscode/issues/193124 was fixed, this change is not needed anymore.

VSCode 1.86.0 now supports double click for unresolved hint data too.
2024-03-11 09:44:02 +00:00
bors
a58f574816 Auto merge of #16762 - wyatt-herkamp:master, r=Veykril
Added QuickFix for unresolved field.

Adds an AssistKind::QuickFix for unresolved field.

Currently, Snippets are not available for Diagnostics. So the type defaults to the Unit type if the type is not able to be inferred.

https://github.com/rust-lang/rust-analyzer/assets/11785959/bd4c67bd-f8cb-4254-9a87-641ae80a7a28

Closes https://github.com/rust-lang/rust-analyzer/issues/4563
2024-03-11 09:31:22 +00:00
Lukas Wirth
0dbaccd484 Track vscode version for conditional bug server sided bugfixes 2024-03-11 10:31:06 +01:00
Kirill Bulatov
57a0ad4343 Stop eagerly resolving inlay hint text edits for VSCode
After https://github.com/microsoft/vscode/issues/193124 was fixed,
this change is not needed anymore.
2024-03-11 10:22:02 +01:00
bors
a5035f4931 Auto merge of #16749 - Veykril:on-demand-validation-err, r=Veykril
internal: Some method resolution cleanups
2024-03-11 09:18:24 +00:00
bors
1069f57d8b Auto merge of #16784 - Veykril:body-invalid, r=Veykril
internal: Remove synstructure const hack support

The latest version of it no longer emits these
2024-03-11 09:05:26 +00:00
Lukas Wirth
c679482d7e Add method resolution deref inference var test 2024-03-11 10:02:03 +01:00
Lukas Wirth
458f4a2960 internal: Treat the self param as different from patterns when lowering 2024-03-11 09:46:28 +01:00
Lukas Wirth
558feeab61 internal: Remove synstructure const hack support 2024-03-11 09:44:40 +01:00
Laurențiu Nicola
f65fe4e281 Fix import 2024-03-11 09:31:02 +02:00
Laurențiu Nicola
ce642071d8 Bring back in-rust-tree feature to ide 2024-03-10 11:08:11 +02:00
Laurențiu Nicola
aa74d57825 Merge commit '574e23ec508064613783cba3d1833a95fd9a5080' into sync-from-ra 2024-03-10 08:47:38 +02:00
Lukas Wirth
09b9a921a8 fix: Don't invalid body query results when generating desugared names 2024-03-07 15:03:16 +01:00
Lukas Wirth
c04c0dd5ba fix: Don't force draw a dependency edge to the real_span_map query 2024-03-07 14:14:59 +01:00
Lukas Wirth
bd0ffb0248 Remove accidental dependency between parse_macro_expansion and parse 2024-03-07 11:16:40 +01:00
Lukas Wirth
9c2fa76c84 Dedup hprof stuff 2024-03-07 10:21:50 +01:00
Lukas Wirth
09d33f3e1e Add diagnostics integrated benchmark 2024-03-07 09:33:48 +01:00
Lukas Wirth
a3b6e891ea Add tracing spans to macro generated database 2024-03-06 20:19:36 +01:00
Wyatt Herkamp
4f0bc1a314 Typo 2024-03-06 11:51:45 -05:00
Wyatt Herkamp
255ba692aa Added tests, added Union Support, and code cleanup 2024-03-06 10:55:47 -05:00
bors
52d8ae791d Auto merge of #16766 - roife:fix-issue-15198, r=Veykril
fix: keep attributes in assist 'generate_delegate_trait'

fix #15198.

This PR address the issue that `impl` generated by `generate_delegate_trait` doesn't keep attributes.
2024-03-06 09:27:49 +00:00
roife
5c9ce7b11f test: add tests for keeping attrs in assist 'generate_delegate_trait' 2024-03-06 15:32:49 +08:00
roife
faea7fca01 fix: keep attrs for assist 'generate_delegate_trait' 2024-03-06 15:32:26 +08:00
hkalbasi
44be2432f5 Add test explorer 2024-03-06 00:05:29 +03:30
Vincent Esche
bf141310f8 Add fn index() accessor for hir::Param 2024-03-05 16:02:22 +01:00
Vincent Esche
1afeea85ff Add fn parent_fn() accessors for hir::Param & hir::SelfParam 2024-03-05 16:01:01 +01:00
Wyatt Herkamp
6027eae51e Fix Tests + Fix Warnings 2024-03-05 08:34:52 -05:00
Wyatt Herkamp
b45cfe15b5 Added quickfix for unresolved field. 2024-03-05 08:07:21 -05:00
roife
9cc3a9cfc2 fix: formatting 2024-03-05 19:55:31 +08:00
Lukas Wirth
d21f88883b Remove some unnecessary cloning in method_resolution 2024-03-05 12:39:27 +01:00
Lukas Wirth
593156a357 Re-use InferenceTable by snapshotting in method resolution 2024-03-05 12:39:27 +01:00
roife
16995ceda9 test: add tests for constants inside range pattern 2024-03-05 19:31:20 +08:00
roife
96a7c6ae3c fix: mir for range pattern 2024-03-05 19:31:20 +08:00
roife
ece18fecfa fix: resolve sub-patterns inside range pattern 2024-03-05 19:31:20 +08:00
bors
2898c4217d Auto merge of #16758 - Veykril:cargo-lock, r=Veykril
Update Cargo.lock
2024-03-05 11:17:42 +00:00
Lukas Wirth
00a6cc0664 Update Cargo.lock 2024-03-05 12:16:19 +01:00
bors
676455f911 Auto merge of #16757 - Veykril:style-lints, r=Veykril
fix: Put style lints behind disabled-by-default config

Fixes https://github.com/rust-lang/rust-analyzer/issues/16542
Fixes https://github.com/rust-lang/rust-analyzer/issues/16725
cc https://github.com/rust-lang/rust-analyzer/issues/16628

Our diagnostic infra is not yet setup for those kinds of diagnostics
2024-03-05 10:45:05 +00:00
Lukas Wirth
8844640c6f fix: Put style lints behind disabled-by-default config 2024-03-05 11:43:23 +01:00
Lukas Wirth
b20e467373 internal: Adjust a few things for trait assoc item hovers 2024-03-05 11:06:36 +01:00
bors
ce3216e0ae Auto merge of #15938 - Young-Flash:display_trait_item_when_hover, r=Veykril
feat: add hover display for trait assoc items

This PR enable preview assoc items when hover on `trait`

![image](https://github.com/rust-lang/rust-analyzer/assets/71162630/d9c3949c-33cf-4a32-aa97-3af46b28033a)

inspired by https://github.com/rust-lang/rust-analyzer/pull/15847
2024-03-05 08:26:53 +00:00
Nicholas Nethercote
49c0b33862 Change message type in bug functions.
From `impl Into<DiagnosticMessage>` to `impl Into<Cow<'static, str>>`.

Because these functions don't produce user-facing output and we don't
want their strings to be translated.
2024-03-05 17:11:42 +11:00
Niklas Lindorfer
2a4ba4295b
fix: hide destructure_struct_binding assist if no public fields 2024-03-04 21:50:01 +00:00
Lukas Wirth
b9dbb8afd9 Regenerate lints table 2024-03-04 17:42:18 +01:00
Lukas Wirth
76463eee48 Move lint definition generation into xtask/codegen 2024-03-04 17:14:14 +01:00