Commit Graph

22612 Commits

Author SHA1 Message Date
bors
caf23f2914 Auto merge of #12745 - jonas-schievink:metavar-exprs, r=jonas-schievink
feat: Implement `ignore`  and `index` metavar expression

Part of https://github.com/rust-lang/rust-analyzer/issues/11952

Fixes https://github.com/rust-lang/rust-analyzer/issues/12675
2022-07-11 16:34:49 +00:00
Jonas Schievink
df66eb74ab Implement ignore and index metavar expression 2022-07-11 18:31:42 +02:00
bors
f7bb9327ad Auto merge of #12744 - hi-rustin:rustin-patch-typos, r=lnicola
Fix typos

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-11 13:51:20 +00:00
hi-rustin
d9ab7f21e4 Fix typos
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-11 21:42:05 +08:00
TonalidadeHidrica
e3bde579c4 Fix obsolete completion.snippets config 2022-07-11 17:00:40 +09:00
TonalidadeHidrica
dfcbed09d3 Fix obsolete enableRangeFormatting config 2022-07-11 16:52:35 +09:00
TonalidadeHidrica
f0649f2c19 Fix rustcSource -> rustc_source
This only fixes the comments in the internal source,
     which is not mandatory at all
2022-07-11 16:50:20 +09:00
TonalidadeHidrica
195ceea910 Fix obsolete diagnostics.experimental.enable 2022-07-11 16:37:46 +09:00
TonalidadeHidrica
6e5571608b Fix obsolete loadOutDirsFromCheck configs 2022-07-11 16:36:36 +09:00
TonalidadeHidrica
eaebead296 Fix config keys regarding imports in docs 2022-07-11 15:43:25 +09:00
harpsword
4b3164f129 fix: ignore renames for crate root 2022-07-10 10:45:03 +08:00
bors
5342f47f42 Auto merge of #12732 - lnicola:bump-npm, r=lnicola
Bump npm deps
2022-07-09 20:26:32 +00:00
Laurențiu Nicola
cb38145714 Bump transitive npm deps 2022-07-09 23:20:06 +03:00
Laurențiu Nicola
a059e79ccb Bump @vscode/test-electron 2022-07-09 23:17:56 +03:00
Laurențiu Nicola
358d6c6dcc Bump @types/node to 16 2022-07-09 23:17:12 +03:00
Laurențiu Nicola
2c9e39553c Bump typescript and tslib 2022-07-09 23:14:17 +03:00
Laurențiu Nicola
8e889ac3b5 Bump prettier 2022-07-09 23:10:39 +03:00
Laurențiu Nicola
d03ed83863 Bump @typescript-eslint 2022-07-09 23:10:07 +03:00
Laurențiu Nicola
0e38961046 Bump vsce 2022-07-09 23:08:59 +03:00
Laurențiu Nicola
7b1b711ecc Bump eslint 2022-07-09 23:07:31 +03:00
Laurențiu Nicola
1b138b11cf Bump esbuild 2022-07-09 23:06:45 +03:00
Laurențiu Nicola
b43708c930 Bump d3 and d3-graphviz 2022-07-09 23:06:06 +03:00
Laurențiu Nicola
03a62c180e Bump vscode-languageclient 2022-07-09 23:04:14 +03:00
bors
666343b759 Auto merge of #12727 - DorianListens:dscheidt/extract-var-field-name, r=jonas-schievink
fix: Improve suggested names for extracted variables

When extracting a field expression, if RA was unable to resolve the type of the
field, we would previously fall back to using "var_name" as the variable name.

Now, when the `Expr` being extracted matches a `FieldExpr`, we can use the
`NameRef`'s ident token as a fallback option.

fixes #10035
2022-07-09 13:08:57 +00:00
hi-rustin
638abba05c Fix test
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-09 11:42:19 +08:00
Dorian Scheidt
21062f9201 fix: Improve suggested names for extracted variables
When extracting a field expression, if RA was unable to resolve the type of the
field, we would previously fall back to using "var_name" as the variable name.

Now, when the `Expr` being extracted matches a `FieldExpr`, we can use the
`NameRef`'s ident token as a fallback option.

fixes #10035
2022-07-08 18:35:04 -05:00
bors
2836dd15f7 Auto merge of #12706 - DorianListens:dscheidt/closure-args, r=DorianListens
fix: Extract Function misses locals used in closures

This change fixes #12705.

In `FunctionBody::analyze`, we need to search any `ClosureExpr`s we encounter
for any `NameRef`s, to ensure they aren't missed.
2022-07-08 15:02:02 +00:00
Dorian Scheidt
603b6fcc68 fix: Extract Function misses locals used in closures
This change fixes #12705.

In `FunctionBody::analyze`, we need to search any `ClosureExpr`s we encounter
for any `NameRef`s, to ensure they aren't missed.
2022-07-08 09:52:01 -05:00
bors
c419aa9775 Auto merge of #12719 - davidlattimore:format-args-no-unsafe, r=jonas-schievink
Remove unnecessary unsafe from format_args expansion
2022-07-08 14:10:19 +00:00
bors
7181a39d4c Auto merge of #12676 - DorianListens:dscheidt/extract-fun-trait-impl, r=jonas-schievink
fix: Extract function from trait impl

This change fixes #10036, "Extract to function assist implements nonexistent
trait methods".

When we detect that the extraction is coming from within a trait impl, and that
a `self` param will be necessary, we adjust which `SyntaxNode` to `insert_after`,
and create a new empty `impl` block for the newly extracted function.
2022-07-08 14:01:36 +00:00
bors
df4ed94f2f Auto merge of #12722 - jonas-schievink:update-urls, r=jonas-schievink
internal: Update remaining GitHub URLs

The old links still work, but it seems less confusing to have them point to the right repo
2022-07-08 13:50:20 +00:00
Jonas Schievink
6c6ae965ba Update remaining GitHub URLs 2022-07-08 15:44:49 +02:00
bors
09abd76c6a Auto merge of #12716 - davidlattimore:fix-publish-crate-names, r=lnicola
publish workflow: Fix names for existing crates

Attempting to publish for example ra_ap_text-edit when ra_ap_text_edit
has already been published is rejected by crates.io.
2022-07-08 05:16:43 +00:00
David Lattimore
6f819e30e4 Remove unnecessary unsafe from format_args expansion 2022-07-08 14:56:18 +10:00
David Lattimore
f0af913ab0 publish workflow: Fix names for existing crates
Attempting to publish for example ra_ap_text-edit when ra_ap_text_edit
has already been published is rejected by crates.io.
2022-07-08 12:58:13 +10:00
bors
c296e77767 Auto merge of #12695 - xuhongxu96:fix-12140, r=jonas-schievink
Complete type param/associated type in trait generic arg per arg index

- Fix #12140
- Also fix tidy check does not work for marks in multiline
2022-07-06 23:58:52 +00:00
Hongxu Xu
3248601a03 fix default type param value position 2022-07-07 07:28:55 +08:00
bors
c46570e694 Auto merge of #12704 - jonas-schievink:smol-paths, r=jonas-schievink
internal: Use `SmallVec` to slightly shrink `ModPath` size

Saves like a megabyte on r-a itself.
2022-07-06 17:57:00 +00:00
Jonas Schievink
d2fd137252 Use SmallVec to slightly shrink ModPath size 2022-07-06 19:49:05 +02:00
Hongxu Xu
0360ed53cf check arg_idx >= n_params only if arg_idx >= n_required_params 2022-07-07 00:54:46 +08:00
Hongxu Xu
75fb3de310 Handle generic args per arg index
Add more test cases for generic args
2022-07-07 00:45:22 +08:00
bors
00194ade76 Auto merge of #12702 - lnicola:vscode-schemes, r=lnicola
internal: use different schemes for the custom views

Related to #12699, but doesn't fix it because we still register the providers multiple times.
2022-07-06 15:57:34 +00:00
Laurențiu Nicola
ad5a8514a0 Code: use different schemes for the custom views 2022-07-06 18:42:15 +03:00
Hongxu Xu
0f2eba54db Show only assoc type args in the correct arg pos 2022-07-06 22:58:27 +08:00
hi-rustin
b9ba9fab5a Add str_ref_to_string fix
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-05 22:47:18 +08:00
bors
fee5555cfa Auto merge of #12694 - hi-rustin:rustin-patch-bors, r=jonas-schievink
Remove useless bors.toml

It seems we do not use bors-ng anymore. So maybe this is useless.
2022-07-05 13:51:36 +00:00
Hongxu Xu
441e659aa1 Complete associated type only in trait generic arg
Fix tidy check does not work for marks in multiline
2022-07-05 21:48:28 +08:00
hi-rustin
0d9737ac1c Fix project root assert
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-05 21:18:00 +08:00
hi-rustin
2926ca0452 Remove useless bors.toml
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-05 21:13:34 +08:00
Lukas Wirth
976d07e53e fix: Fix unresolved proc macro diagnostics pointing to macro expansions 2022-07-05 12:46:09 +02:00