about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-assists
AgeCommit message (Collapse)AuthorLines
2025-04-16fix: use `ast::TokenTree` in `make::expr_macro`Prajwal S N-2/+9
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-15fix: `Extract into function include inline variable in fmt macroHayashi Mikihiro-14/+71
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-14Merge pull request #19568 from snprajwal/destructure-struct-editorLukas Wirth-96/+54
refactor: editor for `destructure_struct_binding`
2025-04-14Merge pull request #19572 from snprajwal/expand-rest-patternLukas Wirth-53/+66
refactor: migrate `expand_rest_pattern` to editor
2025-04-11refactor: migrate `expand_rest_pattern` to editorPrajwal S N-53/+66
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix: `make::expr_call() -> CallExpr`Prajwal S N-22/+31
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix: `make::expr_method_call() -> MethodCallExpr`Prajwal S N-19/+24
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix: `make::expr_closure() -> ClosureExpr`Prajwal S N-1/+1
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11fix: `make::expr_paren() -> ParenExpr`Prajwal S N-7/+11
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-11refactor: editor for `destructure_struct_binding`Prajwal S N-96/+54
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-10Remove all upcasts!Chayim Refael Friedman-14/+6
It turns out there were a lot redundant too.
2025-04-09Merge pull request #19462 from Veykril/push-ypvprvvwkyllLukas Wirth-3/+3
refactor: Lower type-refs before type inference
2025-04-09refactor: Lower type-refs before type inferenceLukas Wirth-3/+3
This refactors how we deal with items in hir-def lowering. - It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures. - We now uniformly lower type AST into TypeRefs before type inference. - Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion. - Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).
2025-04-08fix(auto-import): Prefer imports of matching types for argument lists Lukas Wirth-69/+219
2025-04-04prefer default over newBenjaminBrienen-22/+22
2025-04-03fix(ide-assists): remove `AssistKind::None`Prajwal S N-2/+2
This was being used by a single assist, which qualifies under the "refactor" kind. The variant has been removed, and all usages updated accordingly. Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-31fix: Fix new nightly lintsLukas Wirth-3/+3
2025-03-31fix: Cleanup param name inlay hint filteringLukas Wirth-1/+1
2025-03-27Allow crate authors to control completion of their thingsChayim Refael Friedman-1/+1
Via the new `#[rust_analyzer::completions(...)]` attribute. Also fix a bug with existing settings for that where the paths wouldn't resolve correctly.
2025-03-25Merge pull request #19433 from snprajwal/fix-replace-let-elseLukas Wirth-8/+41
fix(ide-assists): `let else` to `if let else`
2025-03-24fix(ide-assists): `let else` to `if let else`Prajwal S N-8/+41
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-23chore: Bump dependenciesLukas Wirth-3/+3
2025-03-22Speed up resolving "Generate delegate method" assist (part 2)Felicián Németh-552/+480
Make it compile by adding a `None` subtype to rest of the AssistId instantiations.
2025-03-22Speed up resolving "Generate delegate method" assist (part 1)Felicián Németh-5/+8
Fix #19322 Sometimes there are 185 "Generate delegate" assists with the same assist_id and asssist_kind. This commit introduces and additional differentiator: assist_subtype. Therefore, when the LSP client sends an assist resolve request, rust-analyzer only need to compute edits for a single assist instead of 185.
2025-03-21chore: Remove some unnecessary usage of `Semantics`Lukas Wirth-1/+1
2025-03-17Test unsafeness is respected when manual impling derivesAli Bektas-5/+45
2025-03-17Observe unsafeness only for replace_derive_with_manual_implAli Bektas-34/+6
2025-03-17Observe unsafeness when generating manual impls of former derivesAli Bektas-1/+34
2025-03-15cargo fmtBenjaminBrienen-382/+366
2025-03-14feat: for loop to while let assistVishruth-Thimmaiah-0/+448
2025-03-12Salsify the crate graphChayim Refael Friedman-3/+3
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-10internal: port rust-analyzer to new SalsaDavid Barsky-18/+48
2025-03-10Merge pull request #19332 from Veykril/push-trvznlqsvtyqLukas Wirth-20/+5
Make change annotations per text-edit
2025-03-10Make change annotations per text-editLukas Wirth-20/+5
2025-03-10Merge pull request #19330 from ChayimFriedman2/normalize-projectionLukas Wirth-20/+48
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10Merge pull request #19079 from ChayimFriedman2/rename-conflictLukas Wirth-0/+30
feat: Warn the user when a rename will change the meaning of the program
2025-03-09fix: Prevent wrong invocations of `needs_parens_in` with non-ancestral "parent"sShoyu Vanilla-6/+62
2025-03-09internal: Migrate `inline_local_variable` to `SyntaxEditor`Shoyu Vanilla-32/+34
2025-03-06Warn the user when a rename will change the meaning of the programChayim Refael Friedman-0/+30
Specifically, when a rename of a local will change some code that refers it to refer another local, or some code that refer another local to refer to it. We do it by introducing a dummy edit with an annotation. I'm not a fond of this approach, but I don't think LSP has a better way.
2025-03-06Pass the target crate in `HirFormatter`Chayim Refael Friedman-20/+48
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
2025-03-05Merge pull request #19274 from Veykril/push-pouwrwwrlrltLukas Wirth-1/+4
Highlight unsafe operations as unsafe, not definitions
2025-03-05Use HIR unsafety information for unsafe syntax highlightngLukas Wirth-1/+4
2025-03-03Merge pull request #19261 from Veykril/push-rnqlyrvqpolsLukas Wirth-206/+383
Support tuple struct patterns for expand_rest_pattern assist
2025-03-03Support tuple struct patterns for expand_rest_pattern assistLukas Wirth-23/+189
2025-03-02Normalize some assist namesLukas Wirth-199/+210
2025-03-02Merge pull request #19259 from Veykril/push-skmvrmtorqsoLukas Wirth-43/+140
Add flip or-pattern assist
2025-03-02Merge pull request #19253 from ShoyuVanilla/migrate-convert-bool-thenLukas Wirth-30/+52
internal: Migrate `convert_bool_then` to `SyntaxEditor`
2025-03-02Add flip or-pattern assistLukas Wirth-43/+140
2025-03-01Remove syntax editing from parenthesis computationLukas Wirth-79/+30
2025-03-01Migrate `convert_bool_then` to `SyntaxEditor`Shoyu Vanilla-30/+52
Update assist docs