From 8ac25f119eb45d425370d9f7f093bc206e6c4a9f Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Wed, 25 Dec 2019 15:00:10 +0100 Subject: Keep track of visibility during def collection --- crates/ra_hir_def/src/body/lower.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src/body') diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 5323af097..88c4a1216 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs @@ -543,7 +543,10 @@ where }; self.body.item_scope.define_def(def); if let Some(name) = name { - self.body.item_scope.push_res(name.as_name(), def.into()); + let vis = crate::visibility::ResolvedVisibility::Public; // FIXME determine correctly + self.body + .item_scope + .push_res(name.as_name(), crate::per_ns::PerNs::from_def(def, vis)); } } } -- cgit v1.2.3