Artur Sinila
b9b42e8670
tests: add hover tests for const generics
2022-07-17 02:13:09 +03:00
Jonas Schievink
ebfbb314c0
Update 1.63 proc macro ABI to match rustc
2022-07-12 15:19:31 +02:00
Jonas Schievink
df66eb74ab
Implement ignore
and index
metavar expression
2022-07-11 18:31:42 +02:00
hi-rustin
d9ab7f21e4
Fix typos
...
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-11 21:42:05 +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
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
Jonas Schievink
6c6ae965ba
Update remaining GitHub URLs
2022-07-08 15:44:49 +02:00
David Lattimore
6f819e30e4
Remove unnecessary unsafe from format_args expansion
2022-07-08 14:56:18 +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
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
Hongxu Xu
0f2eba54db
Show only assoc type args in the correct arg pos
2022-07-06 22:58:27 +08: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
bors
6edf624cbe
Auto merge of #12690 - Veykril:inert-attrs, r=Veykril
...
internal: Update inert attribute list
2022-07-05 09:55:55 +00:00
Lukas Wirth
383ee6af5e
internal: Update inert attribute list
2022-07-05 11:54:46 +02:00
Florian Diebold
ccf854bc2e
Improve documentation for buildScripts.overrideCommand / checkOnSave.overrideCommand
2022-07-04 18:51:18 +02:00
bors
75b22326da
Auto merge of #12681 - lnicola:bump-deps, r=lnicola
...
Bump deps
2022-07-03 07:25:03 +00:00
Laurențiu Nicola
78beb4c444
Bump chalk
2022-07-03 10:22:10 +03:00
Laurențiu Nicola
e05e6c60a7
Bump object
2022-07-03 10:14:48 +03:00
Laurențiu Nicola
5381811368
Bump tracing-subscriber
2022-07-03 10:12:58 +03:00
Laurențiu Nicola
9e7ca80c82
Bump cargo_metadata
2022-07-03 10:09:35 +03:00
Laurențiu Nicola
6669f388a2
Bump indexmap
2022-07-03 10:09:35 +03:00
Laurențiu Nicola
791f2a0bec
Bump smallvec
2022-07-03 10:09:35 +03:00
Laurențiu Nicola
e6fcb23445
Bump either
2022-07-03 10:09:35 +03:00
Laurențiu Nicola
c7c314d462
Bump quote
2022-07-03 10:09:35 +03:00
Laurențiu Nicola
212f84ab46
Bump crossbeam-channel
2022-07-03 09:56:58 +03:00
Dorian Scheidt
e3940003a2
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-02 15:00:02 -05:00
Dorian Scheidt
0039d6f731
fix: Extract Function produces duplicate fn names
...
This change fixes issue #10037 , in more or less the most naive fashion
possible.
We continue to start with the hardcoded default of "fun_name", and now append a
counter to the end of it if that name is already in scope.
In the future, we can probably apply more heuristics here to wind up with more
useful names by default, but for now this resolves the immediate problem.
2022-07-02 14:24:41 -05:00
Ryo Yoshida
649e1f54cf
fix: report type mismatch on identifier in destructuring assignments
2022-07-03 03:29:15 +09:00
Ryo Yoshida
afdbd6cce2
fix: infer lhs first on ordinary assignment expressions
2022-07-03 03:29:02 +09:00
bors
d101439c77
Auto merge of #12627 - yue4u:fix/struct-variant-patterns, r=Veykril
...
fix: complete enum variants as patterns in pattern path
close #12593
2022-07-02 17:18:24 +00:00
a-kenji
f2963cf8ff
fix: typos in hir-ty
2022-07-02 17:19:06 +02:00
bors
d4b79ad77b
Auto merge of #12678 - Veykril:flyimport, r=Veykril
...
fix: Trigger flyimport completions in item lists again
Fixes https://github.com/rust-lang/rust-analyzer/issues/12656
2022-07-02 14:20:36 +00:00
Lukas Wirth
cd42b20ce3
fix: Trigger flyimport completions in item lists again
2022-07-02 16:20:26 +02:00
yue4u
ea7ea7079c
fix: escape for enum variant
2022-07-02 23:17:29 +09:00
yue4u
622b516c74
fix: variants rendering in pattern path
2022-07-02 20:31:24 +09:00
Florian Diebold
9a12d0d6f2
Fix case of ignored/broken proc macro
2022-07-01 19:00:07 +02:00
Florian Diebold
e71519572c
Add tests for #12669
2022-07-01 19:00:07 +02:00
bors
994f3cf74d
Auto merge of #12636 - xuhongxu96:fix-12148, r=Veykril
...
complete raw identifier with "r#" prefix
Fix #12148
Escape Names and Paths used in `insert_text`/`insert_snippet` while rendering the completion items.
2022-07-01 14:55:51 +00:00
bors
ed44fe52e4
Auto merge of #12668 - Veykril:mac-source-map, r=Veykril
...
fix: Simplify macro statement expansion handling
I only meant to fix https://github.com/rust-lang/rust-analyzer/issues/12644 but that somehow turned into a rewrite of the statement handling ... at least this fixes a few more issues in the IDE layer now
2022-07-01 14:46:48 +00:00
Lukas Wirth
e5e5a0932d
Fix blocks not considering stmt without semi as tails
2022-07-01 16:25:52 +02:00
Lukas Wirth
8e764a8bb1
fix: Fix attribute macros on assoc items being discarded with disabled proc macros
2022-07-01 16:21:21 +02:00
Lukas Wirth
58d5c69a63
Fix Expr::MacroStmts using wrong scopes
2022-07-01 15:34:29 +02:00
Lukas Wirth
9165e3b381
Update hir-ty test outputs
2022-07-01 15:21:55 +02:00
Lukas Wirth
531e152390
fix: Simplify macro statement expansion handling
2022-07-01 14:49:30 +02:00