DropDemBits
8eebf1701b
Migrate replace_derive_with_manual_impl
to mutable ast
2024-02-08 19:13:10 -05:00
DropDemBits
18ea09feca
Migrate generate_new
to mutable ast
2024-02-08 19:13:10 -05:00
DropDemBits
e0117154cf
Migrate generate_impl
to mutable ast
2024-02-08 19:13:10 -05:00
DropDemBits
ab2233e562
Migrate generate_getter_or_setter
to mutable ast
2024-02-08 19:13:09 -05:00
DropDemBits
f1293a8fc4
Add newline to body when where clause is present
2024-02-08 19:13:09 -05:00
DropDemBits
0519414c19
Make ReferenceConversion
methods return ast types
2024-02-08 19:13:09 -05:00
DropDemBits
0e39257e5b
Migrate extract_function
to mutable ast
2024-02-08 19:09:33 -05:00
DropDemBits
3924a0ef7c
Add ast versions of generate{_trait}_impl_text{_intransitive}
2024-02-08 19:09:33 -05:00
DropDemBits
8c0661b2de
Use GenericArgList
for make::impl{_trait}
...
`make::impl_` no longer merges generic params and args in order to be in line
with `make::impl_`, which doesn't do it either.
2024-02-08 19:09:32 -05:00
bors
e07183461f
Auto merge of #16487 - ShoyuVanilla:deref-generate-getter, r=Veykril
...
Remove unnecessary `.as_ref()` in generate getter assist
Resolves #12389
2024-02-08 15:15:52 +00:00
bors
66cec4d11a
Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
...
internal: Lint debug prints and disallowed types with clippy
2024-02-05 17:20:43 +00:00
Shoyu Vanilla
26715a8fde
cargo fmt
2024-02-05 10:48:34 +09:00
Shoyu Vanilla
983cce8c31
Typo fix
2024-02-05 10:37:58 +09:00
Shoyu Vanilla
f0428e57ea
Simplify redundant coercion
2024-02-05 10:35:12 +09:00
Shoyu Vanilla
97ecfe4fab
Remove unnecessary .as_ref()
in generate getter assist
2024-02-05 00:44:57 +09:00
bors
8f6a72871e
Auto merge of #16469 - Young-Flash:ci_typos, r=lnicola
...
internal: add typos check CI (part 2)
follow up https://github.com/rust-lang/rust-analyzer/pull/16448
2024-02-02 12:02:48 +00:00
Young-Flash
ba2910a3a7
minor: correct some typos
2024-02-02 18:22:54 +08:00
Lukas Wirth
9e8a0fae0c
Lint debug prints and disallowed types with clippy
2024-02-01 17:57:27 +01:00
Johann Hemmann
771c6c9271
format_collect
2024-01-31 19:06:36 +01:00
bors
355c9444e1
Auto merge of #16448 - Young-Flash:typos, r=lnicola
...
minor: correct typos
I use [crate-ci/typos](https://github.com/crate-ci/typos ) to check typos in codebase, if it's ok with you, I'd like to add a typo check CI using [typos](https://github.com/crate-ci/typos ) (with Apache-2.0, MIT licenses).
BTW, we can add a [_typos.toml](https://github.com/crate-ci/typos/blob/master/docs/reference.md ) as white list for some intentional typos
2024-01-31 13:29:55 +00:00
David Barsky
e1ea7c8844
internal: switch to tracing
from log
...
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
Young-Flash
db9fd370ee
minor: correct typos
2024-01-30 21:43:43 +08:00
davidsemakula
84e13145ff
add more tests for normalize import assist
2024-01-28 11:55:01 +03:00
davidsemakula
fc00602723
merge imports assist avoids adding unnecessary braces when merging nested use tree selections
2024-01-28 11:55:01 +03:00
davidsemakula
b241593f36
merge imports assist always applies to covering use item except for nested use tree selections
2024-01-28 11:55:01 +03:00
davidsemakula
a8a18f3ccf
add normalize import assist
2024-01-28 11:55:01 +03:00
davidsemakula
8fab92feb2
normalize use trees when merging imports
2024-01-28 11:55:01 +03:00
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
r0cky
1a9ef233b7
Remove unused codes
2024-01-21 12:56:23 +08:00
bors
d4926c10b2
Auto merge of #16405 - dfireBird:guarded-return-for-loop, r=lnicola
...
fix: Include `for` construct in convert to guarded return conditions
2024-01-20 16:13:31 +00:00
dfireBird
721e79035d
include for
in convert to guarded return assist
2024-01-20 19:26:50 +05:30
bors
0c764216d5
Auto merge of #16396 - Young-Flash:fix_marco, r=Veykril
...
fix panic with reference in macro
it panic at `builder.make_mut(segment)`, where segment is from macro expand. And the usage reference in orginal macro call isn't a `PathSegment` so we can't update it in `apply_references`, I can't find a way to deal with it properly so here just filter out the reference in macro. LMK if there are better way to fix this
try to close https://github.com/rust-lang/rust-analyzer/issues/16328
2024-01-20 08:12:44 +00:00
Young-Flash
f9b5e0d219
minor: use reference.range
to get original range
2024-01-20 14:43:42 +08:00
Johann Hemmann
b1a0c9ac40
single_match
2024-01-19 18:31:15 +01:00
Johann Hemmann
71d4dba960
redundant_pattern_matching
2024-01-19 17:31:01 +01:00
Johann Hemmann
3cf1358eb8
question_mark
2024-01-19 17:31:01 +01:00
Johann Hemmann
6738edc259
ptr_arg
2024-01-19 17:31:01 +01:00
Johann Hemmann
e6f9f4c0e4
nonminimal_bool
2024-01-19 17:31:01 +01:00
Johann Hemmann
add40c8660
match_like_matches_macro
2024-01-19 17:31:01 +01:00
Johann Hemmann
b5eca5f2fc
collapsible_if
2024-01-19 17:31:00 +01:00
bors
85c9a83262
Auto merge of #16398 - Urhengulas:satisfy-clippy, r=Veykril
...
`cargo clippy --fix`
This PR is the result of running `cargo clippy --fix && cargo fmt` in the root of the repository. I did not manually review all the changes, but just skimmed through a few of them. The tests still pass, so it seems fine.
2024-01-19 09:43:35 +00:00
davidsemakula
67c1c2bd14
update merge item assist implementation for "one" import granularity
2024-01-18 17:26:53 +03:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
Young-Flash
0bf986d718
add test case with marco reference
2024-01-18 17:43:44 +08:00
Young-Flash
bd26403130
fix panic with reference in macro
2024-01-18 17:43:15 +08:00
davidsemakula
7db4117156
respect "one" import granularity config in merge imports assist
2024-01-18 01:44:57 +03:00
davidsemakula
4f176b3f7f
update import granularity config and docs
2024-01-18 01:44:57 +03:00
bors
f4fec4ff65
Auto merge of #16378 - roife:fix/issue-15470, r=Veykril
...
fix: better handling of SelfParam in assist 'inline_call'
fix #15470 .
The current `inline_call` directly translates `&self` into `let ref this = ...;` and `&mut self` into `let ref mut this = ...;`. However, it does not handle some complex scenarios.
This PR addresses the following transformations (assuming the receiving object is `obj`):
- `self`: `let this = obj`
- `mut self`: `let mut this = obj`
- `&self`: `let this = &obj`
- `&mut self`
+ If `obj` is `let mut obj = ...`, use a mutable reference: `let this = &mut obj`
+ If `obj` is `let obj = &mut ...;`, perform a reborrow: `let this = &mut *obj`
2024-01-17 08:43:13 +00:00
roife
920e99aacb
test: add tests for variant kinds of SelfParam in inline_call
2024-01-17 14:19:57 +08:00
roife
d48498f360
fix: better handling of SelfParam in inline_call
2024-01-17 13:49:07 +08:00