about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2025-09-23Merge pull request #20730 from A4-Tacks/migrate-expand-rest-patShoyu Vanilla (Flint)-12/+11
Migrate `expand_record_rest_pattern` assist to use `SyntaxEditor`
2025-09-23Migrate `expand_record_rest_pattern` assist to use `SyntaxEditor`A4-Tacks-12/+11
Because `add_field` uses `ted`
2025-09-23Add const parameter keyword completionA4-Tacks-1/+28
Example --- ```rust fn foo<c$0>() {} ``` -> ```rust fn foo<const $1: $0>() {} ```
2025-09-23Use ParamEnv in TraitEnvironmentJack Huey-170/+216
2025-09-23Add 'db to TraitEnvironmentJack Huey-109/+122
2025-09-23Make Field::ty return TypeNsjackh726-31/+51
2025-09-22Use ns versions of with_diagnostics queriesjackh726-8/+8
2025-09-22Merge pull request #20592 from A4-Tacks/add-braces-closure-in-matchShoyu Vanilla (Flint)-2/+31
Fix closure in match not applicable for add_braces
2025-09-22Merge pull request #20679 from A4-Tacks/no-comp-ty-in-nested-patShoyu Vanilla (Flint)-0/+20
Fix complete type in nested pattern
2025-09-22Merge pull request #20722 from A4-Tacks/pull-assign-up-inner-ifShoyu Vanilla (Flint)-0/+35
Fix apply in inner if for pull_assignment_up
2025-09-22Merge pull request #20723 from A4-Tacks/fix-bind-unused-applicable-underscoreShoyu Vanilla (Flint)-3/+30
Fix applicable on underscore for bind_unused_param
2025-09-22Merge pull request #20725 from ChayimFriedman2/fix-missing-lifetimeShoyu Vanilla (Flint)-25/+55
fix: Fix lifetime elision handling for `Fn`-style trait bounds
2025-09-22Merge pull request #20717 from ShoyuVanilla/migrate-moreChayim Refael Friedman-153/+122
internal: Migrate more predicate things to next-solver
2025-09-22internal: Migrate more predicate things to next-solverShoyu Vanilla-153/+122
2025-09-22Fix lifetime elision handling for `Fn`-style trait boundsChayim Refael Friedman-25/+55
Two fixes were needed: 1. Previously, we enabled elision for the generic args of `Fn` itself, instead of for generic args of paths within it. 2. In lowering in the new solver the `Output` parameter did not have elision set correctly, I don't know why. In the old lowering it was done correctly.
2025-09-22Merge pull request #20724 from ChayimFriedman2/ns-cleanup3Chayim Refael Friedman-0/+32
minor: Another regression test for next solver fixed bug
2025-09-22Another regression test for next solver fixed bugChayim Refael Friedman-0/+32
2025-09-22Fix applicable on underscore for bind_unused_paramA4-Tacks-3/+30
Fixes: - applicable on underscore prefix parameter - using binding mode as an expression Examples --- ```rust fn foo($0_x: i32, y: i32) {} ``` **Before this PR**: ```rust fn foo(_x: i32, y: i32) { let _ = _x; } ``` **After this PR**: Assist not applicable --- ```rust fn foo(ref $0y: i32) {} ``` **Before this PR**: ```rust fn foo(ref y: i32) { let _ = ref y; } ``` **After this PR**: ```rust fn foo(ref y: i32) { let _ = y; } ```
2025-09-22Fix apply in internal if for pull_assignment_upA4-Tacks-0/+35
Example --- ```rust fn foo() { let mut a = 1; if true { a = 2; } else if true { $0a = 3; } else { a = 4; } } ``` **Before this PR**: ```rust fn foo() { let mut a = 1; if true { a = 2; } else a = if true { 3 } else { 4 }; } ``` **After this PR**: ```rust fn foo() { let mut a = 1; a = if true { 2 } else if true { 3 } else { 4 }; } ```
2025-09-22Clarify `rust-analyzer.inlayHints.maxLength` is not a hard guaranteeChayim Refael Friedman-1/+5
2025-09-21Fix not applicable on trailing comma for remove_dbgA4-Tacks-1/+16
`remove_dbg` not applicable for whitespaces after trailing comma Example --- ```rust fn foo() { dbg!( bar(), ); } ``` **Before this PR**: Assist not applicable **After this PR**: ```rust fn foo() { bar(); } ```
2025-09-20allow take union field addresses in safe rustKivooeo-1/+60
2025-09-20Merge pull request #20706 from A4-Tacks/stdx-replace-inplaceShoyu Vanilla (Flint)-3/+41
Fix to implements in-place stdx::replace
2025-09-20Add some test for stdx::replaceA4-Tacks-0/+30
2025-09-20Merge pull request #20661 from A4-Tacks/suggest-if-bodyShoyu Vanilla (Flint)-8/+82
Fix IfExpr branches suggests
2025-09-20Fix to implements in-place stdx::replaceA4-Tacks-3/+11
2025-09-20Fix IfExpr then branch suggestA4-Tacks-8/+82
- And add logic operation suggest Example --- In the old implementation, it always suggested conditions, this is a lot of noise, e.g `contract_checks()~(use std::intrinsics::contract_checks) const fn() -> bool` ```rust fn foo() { if true { c$0 } } ```
2025-09-20Merge pull request #20710 from A4-Tacks/unused-var-shorthandShoyu Vanilla (Flint)-11/+57
Fix unused_variables fixes shorthand record field
2025-09-20Merge pull request #20709 from ↵Shoyu Vanilla (Flint)-2/+48
A4-Tacks/destruct-panic-on-not-add-deref-and-paren Fix panic `!self.data().mutable` for destructure_struct_binding
2025-09-20Merge pull request #20686 from A4-Tacks/gen-default-not-apply-selectedShoyu Vanilla (Flint)-0/+46
Fix selected applicable generate_default_from_enum_variant
2025-09-20Merge pull request #20689 from ShoyuVanilla/accurate-flycheckDavid Barsky-43/+213
fix: Make flycheck clearing dependency-aware
2025-09-20Fix selected multi variants applicable generate_default_from_enum_variantA4-Tacks-0/+46
2025-09-20Merge pull request #20688 from ↵Shoyu Vanilla (Flint)-0/+18
A4-Tacks/fix-applicable-after-l-curly-replace-is-method-with-if-let Fix applicable after l_curly for replace_is_method_with_if_let_method
2025-09-20Merge pull request #20700 from A4-Tacks/extract-var-let-exprShoyu Vanilla (Flint)-1/+28
Fix extract_variable on LetExpr
2025-09-20Merge pull request #20702 from A4-Tacks/else-not-before-elseShoyu Vanilla (Flint)-3/+133
Fix `else` completion before else keyword
2025-09-20Merge pull request #20708 from A4-Tacks/destruct-ref-mut-panicsShoyu Vanilla (Flint)-9/+96
Fix panics on `Foo{mut x}` for destructure_struct_binding
2025-09-20Fix unused_variables fixes shorthand record fieldA4-Tacks-11/+57
Example --- ```rust struct S { field : u32 } fn main() { let s = S { field : 2 }; let S { $0field } = s } ``` **Before this PR**: ```rust struct S { field : u32 } fn main() { let s = S { field : 2 }; let S { _field } = s } ``` **After this PR**: ```rust struct S { field : u32 } fn main() { let s = S { field : 2 }; let S { field: _field } = s } ```
2025-09-20Fix panic `!self.data().mutable` for destructure_struct_bindingA4-Tacks-2/+48
When the reference type does not require adding a dereference or parentheses, it will panic Example --- ```rust struct Foo { bar: i32, baz: i32 } fn main() { let $0foo = &Foo { bar: 1, baz: 2 }; let _ = &foo.bar; } ``` **Before this PR**: Panic: ``` assertion failed: !self.data().mutable ``` **After this PR**: ```rust struct Foo { bar: i32, baz: i32 } fn main() { let Foo { bar, baz } = &Foo { bar: 1, baz: 2 }; let _ = bar; } ```
2025-09-20Fix panics on `Foo{mut x}` for destructure_struct_bindingA4-Tacks-9/+96
Example --- ```rust struct Foo { x: () } struct Bar { foo: Foo } fn f(Bar { mut $0foo }: Bar) {} ``` **Before this PR**: Panic `Option::unwrap` **After this PR**: ```rust struct Foo { x: () } struct Bar { foo: Foo } fn f(Bar { foo: Foo { mut x } }: Bar) {} ```
2025-09-20Bump rustc crates once moreLaurențiu Nicola-34/+32
2025-09-20fix: Make flycheck clearing dependency-awareShoyu Vanilla-43/+213
2025-09-19Merge pull request #20701 from A4-Tacks/track-caller-assist-testChayim Refael Friedman-0/+1
Add `#[track_caller]` for check_assist_by_label
2025-09-19Merge pull request #20697 from Oblarg/fix-negative-const-generic-literalsShoyu Vanilla (Flint)-1/+47
fix negative const generic integer literals
2025-09-19address review feedbackOblarg-0/+23
2025-09-19minor: Get rid of unused deps `chalk-solve` and `chalk-recursive`Shoyu Vanilla-88/+16
2025-09-19Fix `else` completion before else keywordA4-Tacks-3/+133
Example --- ```rust fn foo() { let x = if true { 1 } el$0 else { 2 }; } ``` **Before this PR**: ```text else~ k [LS] else if~ k [LS] ``` **After this PR**: ```text else if~ k [LS] ```
2025-09-19Add `#[track_caller]` for check_assist_by_labelA4-Tacks-0/+1
2025-09-19Fix extract_variable on LetExprA4-Tacks-1/+28
Example --- ```rust fn main() { if $0let$0 Some(x) = Some(2+2) {} } ``` **Before this PR**: ```rust fn main() { let $0var_name = let Some(x) = Some(2+2); if var_name {} } ``` **After this PR**: ```rust fn main() { let $0var_name = Some(2+2); if let Some(x) = var_name {} } ```
2025-09-19Set WithCachedTypeInfo::stable_hash when in-treeLaurențiu Nicola-0/+6
2025-09-18fix negative const generic integer literalsOblarg-1/+24