about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2025-09-26Merge pull request #20748 from A4-Tacks/migrate-arith-op-precShoyu Vanilla (Flint)-12/+15
Migrate `replace_arith_op` assist to use `SyntaxEditor`
2025-09-26Merge pull request #20599 from A4-Tacks/bang-de-morganShoyu Vanilla (Flint)-7/+28
Add applicable on bang `!` for apply_demorgan
2025-09-26Migrate `replace_arith_op` assist to use `SyntaxEditor`A4-Tacks-12/+15
2025-09-26Merge pull request #20611 from A4-Tacks/replace-arith-op-precShoyu Vanilla (Flint)-1/+22
Fix precedence parenthesis for replace_arith_op
2025-09-26Merge pull request #20604 from A4-Tacks/cfg-attr-compShoyu Vanilla (Flint)-1/+53
Add cfg_attr predicate completion
2025-09-26Merge pull request #20729 from A4-Tacks/const-param-kwdShoyu Vanilla (Flint)-1/+28
Add const parameter keyword completion
2025-09-26Merge pull request #20731 from A4-Tacks/expand-rest-pat-in-tuple-slice-patShoyu Vanilla (Flint)-19/+289
Fix expand rest pattern in tuple and slice pattern
2025-09-26Fix expand rest pattern in tuple and slice patternA4-Tacks-19/+289
Assist: expand_tuple_rest_pattern Fills fields by replacing rest pattern in tuple patterns. Example --- ``` fn foo(bar: (char, i32, i32)) { let (ch, ..$0) = bar; } ``` -> ``` fn foo(bar: (char, i32, i32)) { let (ch, _1, _2) = bar; } ``` --- Assist: expand_slice_rest_pattern Fills fields by replacing rest pattern in slice patterns. Example --- ``` fn foo(bar: [i32; 3]) { let [first, ..$0] = bar; } ``` -> ``` fn foo(bar: [i32; 3]) { let [first, _1, _2] = bar; } ```
2025-09-26Merge pull request #20598 from A4-Tacks/let-chain-sup-conv-to-guarded-retShoyu Vanilla (Flint)-45/+252
Add let-chain support for convert_to_guarded_return
2025-09-26Merge pull request #20736 from A4-Tacks/fix-invert-if-let-chainShoyu Vanilla (Flint)-4/+13
Fix applicable on if-let-chain for invert_if
2025-09-26Merge pull request #20742 from A4-Tacks/unused-raw-varShoyu Vanilla (Flint)-2/+16
Fix fixes for unused raw variables
2025-09-25Add applicable in closure for convert_to_guarded_returnA4-Tacks-5/+49
Example --- ```rust fn main() { let _f = || { bar(); if$0 true { foo(); // comment bar(); } } } ``` -> ```rust fn main() { let _f = || { bar(); if false { return; } foo(); // comment bar(); } } ```
2025-09-25Fix not applicable for if-expr in let-stmtA4-Tacks-6/+28
Example --- ```rust fn main() { let _x = loop { if$0 let Ok(x) = Err(92) { foo(x); } }; } ``` **Before**: Assist not applicable **After**: ```rust fn main() { let _x = loop { let Ok(x) = Err(92) else { continue }; foo(x); }; } ```
2025-09-25Add let-chain support for convert_to_guarded_returnA4-Tacks-38/+179
- And add early expression `None` in function `Option` return Example --- ```rust fn main() { if$0 let Ok(x) = Err(92) && x < 30 && let Some(y) = Some(8) { foo(x, y); } } ``` -> ```rust fn main() { let Ok(x) = Err(92) else { return }; if x >= 30 { return; } let Some(y) = Some(8) else { return }; foo(x, y); } ```
2025-09-25Fix fixes for unused raw variablesA4-Tacks-2/+16
Example --- ``` fn main() { let $0r#type = 2; } ``` **Before this PR**: ```rust fn main() { let _r#type = 2; } ``` **After this PR**: ```rust fn main() { let _type = 2; } ```
2025-09-25Merge pull request #20738 from jackh726/next-trait-solver-next4Shoyu Vanilla (Flint)-127/+97
Remove non-ns version of impl_self_ty and impl_trait
2025-09-25Merge pull request #20735 from itsjunetime/fix_scip_salsaShoyu Vanilla (Flint)-1/+1
fix SCIP panicking due to salsa not attaching
2025-09-25Install cargo for proc-macro-srv testsLaurențiu Nicola-2/+2
2025-09-25Also install rustfmt on stableLaurențiu Nicola-3/+3
2025-09-25Merge ref 'caccb4d0368b' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-40/+5
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: caccb4d0368bd918ef6668af8e13834d07040417 Filtered ref: 0f345ed05d559bbfb754f1403b16199366cda2e0 Upstream diff: https://github.com/rust-lang/rust/compare/21a19c297d4f5a03501d92ca251bd7a17073c08a...caccb4d0368bd918ef6668af8e13834d07040417 This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-25Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to caccb4d0368bd918ef6668af8e13834d07040417.
2025-09-24fix SCIP panicking due to salsa not attachingitsjunetime-1/+1
2025-09-24Implement fallback properlyChayim Refael Friedman-230/+770
fallback.rs was ported straight from rustc (minus the lint parts). This fixes the `!` regressions.
2025-09-24Merge pull request #20683 from regexident/inference-result-types-iterChayim Refael Friedman-0/+20
Expose iterators over an inference result's types
2025-09-24Switch next-solver related rustc dependencies of r-a to crates.io onesShoyu Vanilla-40/+5
2025-09-24Fix applicable on if-let-chain for invert_ifA4-Tacks-4/+13
Example --- ```rust fn f() { i$0f x && let Some(_) = Some(1) { 1 } else { 0 } } ``` **Before this PR**: ```rust fn f() { if !(x && let Some(_) = Some(1)) { 0 } else { 1 } } ``` **After this PR**: Assist not applicable
2025-09-24Remove non-ns version of impl_self_ty and impl_traitjackh726-127/+97
2025-09-24Merge pull request #20733 from jackh726/next-trait-solver-next3Shoyu Vanilla (Flint)-528/+461
Convert more things from chalk to next solver
2025-09-23Be sure to instantiate and pass up trait refs in ↵Jack Huey-12/+15
named_associated_type_shorthand_candidates
2025-09-23Remove all non-ns diagnostics queries, naming consistenlyJack Huey-154/+90
2025-09-23Use lower_nextsolver::callable_item_signature instead of ↵Jack Huey-141/+188
lower::callable_item_signature
2025-09-23Merge pull request #20543 from sgasho/fix/19443_replace_match_with_if_letShoyu Vanilla (Flint)-1/+23
Fix "Replace match with if let" not to trigger when invalid transformations occur
2025-09-23Expose iterators over an inference result's typesVincent Esche-0/+20
(This re-introduces a reduced access to a couple of previously public fields on `InferenceResult`)
2025-09-23Remove lower::value_ty in favor of lower_nextsolver::value_tyJack Huey-134/+61
2025-09-23Remove lower::ty in favor of lower_nextsolver::tyJack Huey-92/+112
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.