Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_assists/src/handlers/extract_variable.rs')
| -rw-r--r-- | crates/ide_assists/src/handlers/extract_variable.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ide_assists/src/handlers/extract_variable.rs b/crates/ide_assists/src/handlers/extract_variable.rs index b498d86fb4..cc5521201d 100644 --- a/crates/ide_assists/src/handlers/extract_variable.rs +++ b/crates/ide_assists/src/handlers/extract_variable.rs @@ -171,6 +171,7 @@ fn get_receiver_type(ctx: &AssistContext, expression: &ast::Expr) -> Option<hir: Some(ctx.sema.type_of_expr(&receiver)?.original()) } +/// In the expression `a.b.c.x()`, find `a` fn get_receiver(expression: ast::Expr) -> Option<ast::Expr> { match expression { ast::Expr::FieldExpr(field) if field.expr().is_some() => { |