aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/lower.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-09-12 18:39:10 +0100
committerAleksey Kladov <[email protected]>2019-09-12 19:34:22 +0100
commit63e1e63a9160d28597a8d77fd83c43a2c90d3f6b (patch)
tree381f2d4a92db5cdfd35c9e76d5c6b11bcb247c41 /crates/ra_hir/src/ty/lower.rs
parent5c09c5949a94012b5ae95735dc8c086efd5039e4 (diff)
start cleaning up the resolution
Nameres related types, like `PerNs<Resolution>`, can represent unreasonable situations, like a local in a type namespace. We should clean this up, by requiring that call-site specifies the kind of resolution it expects.
Diffstat (limited to 'crates/ra_hir/src/ty/lower.rs')
-rw-r--r--crates/ra_hir/src/ty/lower.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/lower.rs b/crates/ra_hir/src/ty/lower.rs
index 061229842..e67525a74 100644
--- a/crates/ra_hir/src/ty/lower.rs
+++ b/crates/ra_hir/src/ty/lower.rs
@@ -86,7 +86,7 @@ impl Ty {
86 } 86 }
87 } 87 }
88 88
89 pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Self { 89 pub(crate) fn from_hir_path(db: &impl HirDatabase, resolver: &Resolver, path: &Path) -> Ty {
90 // Resolve the path (in type namespace) 90 // Resolve the path (in type namespace)
91 let (resolution, remaining_index) = resolver.resolve_path_segments(db, path).into_inner(); 91 let (resolution, remaining_index) = resolver.resolve_path_segments(db, path).into_inner();
92 let resolution = resolution.take_types(); 92 let resolution = resolution.take_types();