Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7b663a3

Browse files
committed
Auto merge of rust-lang#12464 - harpsword:fix-inline-variable-mismatched-type, r=Veykril
feat: fix inline variable produce mismatched type wrap reference for RefExpr initializer to fix rust-lang#12453
2 parents 745230c + 061c5ef commit 7b663a3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/ide-assists/src/handlers/inline_local_variable.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> O
8888
| ast::Expr::MethodCallExpr(_)
8989
| ast::Expr::FieldExpr(_)
9090
| ast::Expr::TryExpr(_)
91-
| ast::Expr::RefExpr(_)
9291
| ast::Expr::Literal(_)
9392
| ast::Expr::TupleExpr(_)
9493
| ast::Expr::ArrayExpr(_)
@@ -575,7 +574,7 @@ fn foo() {
575574
r"
576575
fn foo() {
577576
let bar = 10;
578-
let b = &bar * 10;
577+
let b = (&bar) * 10;
579578
}",
580579
);
581580
}

0 commit comments

Comments
 (0)