This commit is contained in:
Jeroen Vannevel 2022-01-05 01:48:57 +00:00
parent fa0afb9576
commit abab0154b6
No known key found for this signature in database
GPG Key ID: 78EF5F52F38C49BD

View File

@ -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() => {