Commit Graph

26469 Commits

Author SHA1 Message Date
Laurențiu Nicola
1fc056ec93 Bump indexmap 2023-11-15 13:21:34 +02:00
Laurențiu Nicola
2bfd6b659d Bump serde_json 2023-11-15 13:17:36 +02:00
Laurențiu Nicola
970a796368 Bump serde 2023-11-15 13:16:07 +02:00
Laurențiu Nicola
cb8434e594 Bump either 2023-11-15 13:07:36 +02:00
Laurențiu Nicola
2dbdaa247b Bump tracing-subscriber 2023-11-15 13:04:39 +02:00
Laurențiu Nicola
d83620a5ba Bump tracing-tree 2023-11-15 13:01:54 +02:00
Laurențiu Nicola
f53368dd3f Bump tracing 2023-11-15 13:00:32 +02:00
Laurențiu Nicola
f66df10f87 Bump itertools 2023-11-15 12:53:56 +02:00
Laurențiu Nicola
dfc885e0fd Bump anyhow 2023-11-15 12:49:32 +02:00
bors
57ef70cc08 Auto merge of #15901 - Veykril:inner-diag, r=lnicola
fix: Diagnose everything in nested items, not just def diagnostics

Turns out we only calculated def diagnostics for these before (was wondering why I wasn't getting any type mismatches)
2023-11-15 10:07:15 +00:00
bors
535eb0da9d Auto merge of #15874 - DropDemBits:structured-snippet-migrate-4, r=Veykril
internal: Migrate assists to the structured snippet API, part 4

Continuing from #15260

Migrates the following assists:
- `add_turbo_fish`
- `add_type_ascription`
- `destructure_tuple_binding`
- `destructure_tuple_binding_in_subpattern`

I did this a while ago, but forgot to make a PR for the changes until now. 😅
2023-11-15 09:54:45 +00:00
bors
a47330308b Auto merge of #15875 - Young-Flash:fix_grammar, r=Veykril
fix `PathSegment` grammar

close https://github.com/rust-lang/rust-analyzer/issues/15778
2023-11-15 09:43:11 +00:00
Lukas Wirth
498f39eae2 fix: Diagnose everything in nested items, not just def diagnostics 2023-11-15 10:34:09 +01:00
bors
c94a6afbe6 Auto merge of #15900 - lnicola:no-32bit-vsix, r=lnicola
internal: Disable win32-ia32 VSIX builds

https://code.visualstudio.com/updates/v1_84#_windows-32bit-support-ends
2023-11-15 09:31:18 +00:00
Laurențiu Nicola
fb70fe27d4 Disable win32-ia32 VSIX builds 2023-11-15 11:07:31 +02:00
bors
f888a6eb5f Auto merge of #15899 - lnicola:sync-from-rust, r=Veykril
internal: Sync from rust
2023-11-15 08:01:51 +00:00
Laurențiu Nicola
6b53c09ef5 Merge branch 'master' into sync-from-rust 2023-11-15 09:46:27 +02:00
Laurențiu Nicola
610eafe009 Merge commit '76633199f4316b9c659d4ec0c102774d693cd940' into sync-from-rust 2023-11-15 09:45:17 +02:00
DropDemBits
3f99a56fae
Fix panic in add_type_ascription
Assist wasn't applicable when the let statement was missing a pattern
before, so we should do the same now.
2023-11-14 18:43:48 -05:00
DropDemBits
df629627c5
Add tests for LetStmt::set_ty 2023-11-14 17:35:24 -05:00
bors
c1e65aa588 Auto merge of #15895 - Veykril:unsafe-impls-diagnostic, r=Veykril
Diagnose missing assoc items in trait impls
2023-11-14 21:11:23 +00:00
Lukas Wirth
723d799ec1 Diagnose missing assoc items in trait impls 2023-11-14 22:00:52 +01:00
bors
989000b8c5 Auto merge of #15893 - Veykril:unsafe-impls-diagnostic, r=Veykril
Diagnose incorrect unsafety for trait impls
2023-11-14 20:24:21 +00:00
Lukas Wirth
e21d21a8fb Diagnose incorrect unsafety for trait impls 2023-11-14 21:05:27 +01:00
bors
6e4538a6e9 Auto merge of #15891 - Veykril:orphan-impls, r=Veykril
feat: Diagnose some orphan trait impl cases
2023-11-14 17:55:30 +00:00
Lukas Wirth
d5faad1dae Fix inlay-hint tests being invalidated by minicore chanes 2023-11-14 18:53:48 +01:00
Lukas Wirth
6ddccc9a6e Diagnose some orphan trait impl cases 2023-11-14 18:09:34 +01:00
Laurențiu Nicola
d45ff2484f Depend on rustc_driver 2023-11-14 18:07:02 +02:00
Lukas Wirth
b74015512d Remove UserError from LayoutError 2023-11-14 13:32:04 +01:00
Lukas Wirth
e844784d8d Simplify 2023-11-14 12:53:14 +01:00
DropDemBits
787ca888e3
Add IdentPat::set_pat
Needed so that the `tuple_pat` node gets added to the syntax tree,
which is required as we're using structured snippets.
2023-11-13 20:41:06 -05:00
DropDemBits
6f68cd3394
Remove unwraps from destructure_tuple_binding 2023-11-13 18:42:58 -05:00
Laurențiu Nicola
b6951defa6 Add missing rustc_private features 2023-11-13 21:38:57 +02:00
Young-Flash
3e5bc9a9c8 impl qualifying_trait for PathSegment 2023-11-13 18:14:00 +08:00
bors
416e9c856a Auto merge of #15881 - nokazn:docs/fix-vscode-setting-samples, r=lnicola
docs: fix VS Code setting samples

Fix invalid JSONC examples (missing double quotes) in VS Code's `settings.json` .
Thank you.
2023-11-12 17:07:42 +00:00
bors
4fc208e693 Auto merge of #15882 - Veykril:fix-config-keys, r=Veykril
minor: Fix import preference config keys
2023-11-12 16:50:10 +00:00
Lukas Wirth
d6b908ec41 Fix import preference config keys 2023-11-12 17:48:40 +01:00
bors
92d9ca7d64 Auto merge of #15876 - DropDemBits:lsp-ext-multiple-snippet-textedit, r=Veykril
minor: Allow multiple snippet edits in a `TextDocumentEdit`

Explicitly[^1] allow a single `TextDocumentEdit` to have multiple `SnippetTextEdit`s. This allows things like renaming extracted variables and functions without having to go through a separate rename step. For an example of what this looks like, see the video in [this comment](https://github.com/microsoft/vscode/issues/145374#issuecomment-1177341711).

The behavior described here lines up with [what VSCode does](bdc113ffe1/src/vscode-dts/vscode.d.ts (L3728-L3731)), and presumably what the eventual LSP behavior will be.

[^1]: This was technically the case before #15269, a single `TextDocumentEdit` always had multiple edits which were `InsertTextFormat.Snippet` as all of the edits were marked as being snippets, even if there weren't any tab stops or placeholders.
2023-11-12 15:20:42 +00:00
bors
8bfe0aaba9 Auto merge of #15880 - lnicola:vfs-toml, r=Veykril
internal: Include toml files in the vfs

Closes #15753
2023-11-12 15:04:02 +00:00
Laurențiu Nicola
bad3d9e766 Include toml files in the vfs 2023-11-12 16:45:47 +02:00
bors
1152f593b3 Auto merge of #15870 - lnicola:expand-macro, r=lnicola
minor: Make "Expand macro" command title more explicit

Closes [#15856](https://github.com/rust-lang/rust-analyzer/issues/15856).

I opted for "caret", since it's the better term (cursor is the mouse), but I'm not sure how popular it is these days.
2023-11-12 13:48:43 +00:00
Laurențiu Nicola
cace36cade Make Expand macro command title more explicit 2023-11-12 11:43:46 +02:00
Young-Flash
23fde40fed fix PathSegment grammar 2023-11-12 11:20:14 +08:00
DropDemBits
1e4686865e
Allow multiple snippet edits in a TextDocumentEdit 2023-11-11 22:12:49 -05:00
DropDemBits
4aaa592a9a
Migrate destructure_tuple_binding to mutable ast
Due to the way the current tree mutation api works, we need to collect
changes before we can apply them to the real syntax tree, and also can only
switch to a file once.

`destructure_tuple_binding_in_sub_pattern` also gets migrated even
though can't be used.
2023-11-11 21:07:19 -05:00
DropDemBits
f3dcc67dfa
Migrate add_type_ascription 2023-11-11 21:05:27 -05:00
DropDemBits
5fc8cc52e2
Add LetStmt::set_ty
Way for setting and removing the type ascription of a let stmt
2023-11-11 21:05:27 -05:00
DropDemBits
92422f7488
Use syntax's version of SyntaxElement 2023-11-11 21:05:27 -05:00
DropDemBits
cc4e06f04b
Migrate add_turbo_fish to mutable ast
`add_type_ascription` is still left as-is since it's a different assist
2023-11-11 21:05:26 -05:00
DropDemBits
02c7b8b9ba
Add MethodCallExpr::get_or_create_generic_arg_list
Mirrors `PathSegment's` version, except that it always generates a
turbofish
2023-11-11 21:05:26 -05:00