diff options
author | Paul Daniel Faria <[email protected]> | 2020-06-26 02:34:39 +0100 |
---|---|---|
committer | Paul Daniel Faria <[email protected]> | 2020-06-26 16:11:51 +0100 |
commit | 76755ce176222128c354647941cea65ac30ff4bd (patch) | |
tree | c79df926033b6eb94522c5dcf6f17734640eeb13 /crates/ra_hir_def/src/body/lower.rs | |
parent | de9e964e4ac21897bd48adbe37f379d74422919f (diff) |
Split glob import map to per-ns, switch ExprCollector to use a simpler push_res
Diffstat (limited to 'crates/ra_hir_def/src/body/lower.rs')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index d749c828d..3ced648e5 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -26,7 +26,7 @@ use crate::{ | |||
26 | dummy_expr_id, ArithOp, Array, BinaryOp, BindingAnnotation, CmpOp, Expr, ExprId, Literal, | 26 | dummy_expr_id, ArithOp, Array, BinaryOp, BindingAnnotation, CmpOp, Expr, ExprId, Literal, |
27 | LogicOp, MatchArm, Ordering, Pat, PatId, RecordFieldPat, RecordLitField, Statement, | 27 | LogicOp, MatchArm, Ordering, Pat, PatId, RecordFieldPat, RecordLitField, Statement, |
28 | }, | 28 | }, |
29 | item_scope::{BuiltinShadowMode, ImportType}, | 29 | item_scope::BuiltinShadowMode, |
30 | item_tree::{FileItemTreeId, ItemTree, ItemTreeNode}, | 30 | item_tree::{FileItemTreeId, ItemTree, ItemTreeNode}, |
31 | path::{GenericArgs, Path}, | 31 | path::{GenericArgs, Path}, |
32 | type_ref::{Mutability, Rawness, TypeRef}, | 32 | type_ref::{Mutability, Rawness, TypeRef}, |
@@ -81,7 +81,6 @@ pub(super) fn lower( | |||
81 | map | 81 | map |
82 | }, | 82 | }, |
83 | expander, | 83 | expander, |
84 | import_types: FxHashMap::default(), | ||
85 | } | 84 | } |
86 | .collect(params, body) | 85 | .collect(params, body) |
87 | } | 86 | } |
@@ -94,7 +93,6 @@ struct ExprCollector<'a> { | |||
94 | source_map: BodySourceMap, | 93 | source_map: BodySourceMap, |
95 | 94 | ||
96 | item_trees: FxHashMap<HirFileId, Arc<ItemTree>>, | 95 | item_trees: FxHashMap<HirFileId, Arc<ItemTree>>, |
97 | import_types: FxHashMap<Name, ImportType>, | ||
98 | } | 96 | } |
99 | 97 | ||
100 | impl ExprCollector<'_> { | 98 | impl ExprCollector<'_> { |
@@ -713,10 +711,8 @@ impl ExprCollector<'_> { | |||
713 | _ => true, | 711 | _ => true, |
714 | }; | 712 | }; |
715 | self.body.item_scope.push_res( | 713 | self.body.item_scope.push_res( |
716 | &mut self.import_types, | ||
717 | name.as_name(), | 714 | name.as_name(), |
718 | crate::per_ns::PerNs::from_def(def, vis, has_constructor), | 715 | crate::per_ns::PerNs::from_def(def, vis, has_constructor), |
719 | ImportType::Named, | ||
720 | ); | 716 | ); |
721 | } | 717 | } |
722 | } | 718 | } |