aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r--crates/ra_hir/src/expr.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 4e73590d0..e9db8282f 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -14,7 +14,7 @@ use crate::{
14 name::AsName, 14 name::AsName,
15 type_ref::{Mutability, TypeRef}, 15 type_ref::{Mutability, TypeRef},
16}; 16};
17use crate::ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy}; 17use crate::{ path::GenericArgs, ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy}};
18 18
19pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax}; 19pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax};
20 20
@@ -193,6 +193,7 @@ pub enum Expr {
193 receiver: ExprId, 193 receiver: ExprId,
194 method_name: Name, 194 method_name: Name,
195 args: Vec<ExprId>, 195 args: Vec<ExprId>,
196 generic_args: Option<GenericArgs>,
196 }, 197 },
197 Match { 198 Match {
198 expr: ExprId, 199 expr: ExprId,
@@ -597,7 +598,11 @@ impl ExprCollector {
597 Vec::new() 598 Vec::new()
598 }; 599 };
599 let method_name = e.name_ref().map(|nr| nr.as_name()).unwrap_or_else(Name::missing); 600 let method_name = e.name_ref().map(|nr| nr.as_name()).unwrap_or_else(Name::missing);
600 self.alloc_expr(Expr::MethodCall { receiver, method_name, args }, syntax_ptr) 601 let generic_args = e.type_arg_list().and_then(GenericArgs::from_ast);
602 self.alloc_expr(
603 Expr::MethodCall { receiver, method_name, args, generic_args },
604 syntax_ptr,
605 )
601 } 606 }
602 ast::ExprKind::MatchExpr(e) => { 607 ast::ExprKind::MatchExpr(e) => {
603 let expr = self.collect_expr_opt(e.expr()); 608 let expr = self.collect_expr_opt(e.expr());