diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 19:53:36 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 19:53:36 +0100 |
commit | 134d3c3c5068abc5ed3e03fe5df2b524ea70753d (patch) | |
tree | de4342a453b3b504178dd17c46fab3e1d6e995d2 /crates/ra_hir_def/src/body | |
parent | 6f5b53013c54fa6d8429b717998cdb77a4d68b2c (diff) | |
parent | 2e2642efccd5855e4158b01a006e7884a96982bb (diff) |
Merge #5612
5612: Remove TypeAscriptionOwner r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/body')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 78f6da5b8..288ca76c3 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -11,7 +11,7 @@ use ra_arena::Arena; | |||
11 | use ra_syntax::{ | 11 | use ra_syntax::{ |
12 | ast::{ | 12 | ast::{ |
13 | self, ArgListOwner, ArrayExprKind, LiteralKind, LoopBodyOwner, ModuleItemOwner, NameOwner, | 13 | self, ArgListOwner, ArrayExprKind, LiteralKind, LoopBodyOwner, ModuleItemOwner, NameOwner, |
14 | SlicePatComponents, TypeAscriptionOwner, | 14 | SlicePatComponents, |
15 | }, | 15 | }, |
16 | AstNode, AstPtr, | 16 | AstNode, AstPtr, |
17 | }; | 17 | }; |
@@ -466,8 +466,7 @@ impl ExprCollector<'_> { | |||
466 | if let Some(pl) = e.param_list() { | 466 | if let Some(pl) = e.param_list() { |
467 | for param in pl.params() { | 467 | for param in pl.params() { |
468 | let pat = self.collect_pat_opt(param.pat()); | 468 | let pat = self.collect_pat_opt(param.pat()); |
469 | let type_ref = | 469 | let type_ref = param.ty().map(|it| TypeRef::from_ast(&self.ctx(), it)); |
470 | param.ascribed_type().map(|it| TypeRef::from_ast(&self.ctx(), it)); | ||
471 | args.push(pat); | 470 | args.push(pat); |
472 | arg_types.push(type_ref); | 471 | arg_types.push(type_ref); |
473 | } | 472 | } |
@@ -607,8 +606,7 @@ impl ExprCollector<'_> { | |||
607 | .map(|s| match s { | 606 | .map(|s| match s { |
608 | ast::Stmt::LetStmt(stmt) => { | 607 | ast::Stmt::LetStmt(stmt) => { |
609 | let pat = self.collect_pat_opt(stmt.pat()); | 608 | let pat = self.collect_pat_opt(stmt.pat()); |
610 | let type_ref = | 609 | let type_ref = stmt.ty().map(|it| TypeRef::from_ast(&self.ctx(), it)); |
611 | stmt.ascribed_type().map(|it| TypeRef::from_ast(&self.ctx(), it)); | ||
612 | let initializer = stmt.initializer().map(|e| self.collect_expr(e)); | 610 | let initializer = stmt.initializer().map(|e| self.collect_expr(e)); |
613 | Statement::Let { pat, type_ref, initializer } | 611 | Statement::Let { pat, type_ref, initializer } |
614 | } | 612 | } |