mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
Auto merge of #12464 - harpsword:fix-inline-variable-mismatched-type, r=Veykril
feat: fix inline variable produce mismatched type wrap reference for RefExpr initializer to fix #12453
This commit is contained in:
commit
7b663a3a4a
@ -88,7 +88,6 @@ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> O
|
||||
| ast::Expr::MethodCallExpr(_)
|
||||
| ast::Expr::FieldExpr(_)
|
||||
| ast::Expr::TryExpr(_)
|
||||
| ast::Expr::RefExpr(_)
|
||||
| ast::Expr::Literal(_)
|
||||
| ast::Expr::TupleExpr(_)
|
||||
| ast::Expr::ArrayExpr(_)
|
||||
@ -575,7 +574,7 @@ fn foo() {
|
||||
r"
|
||||
fn foo() {
|
||||
let bar = 10;
|
||||
let b = &bar * 10;
|
||||
let b = (&bar) * 10;
|
||||
}",
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user