From 51e2d76b9839410020c75ac02ad602675b0a5aa9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 12 Sep 2019 23:35:53 +0300 Subject: Specify desirable namespace when calling resolve That way, we are able to get rid of a number of unreachable statements --- crates/ra_hir/src/nameres/per_ns.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'crates/ra_hir/src/nameres/per_ns.rs') diff --git a/crates/ra_hir/src/nameres/per_ns.rs b/crates/ra_hir/src/nameres/per_ns.rs index d07cc08f4..b0f4dff33 100644 --- a/crates/ra_hir/src/nameres/per_ns.rs +++ b/crates/ra_hir/src/nameres/per_ns.rs @@ -68,10 +68,6 @@ impl PerNs { PerNs { types: None, values: None, macros: self.macros } } - pub fn as_ref(&self) -> PerNs<&T> { - PerNs { types: self.types.as_ref(), values: self.values.as_ref(), macros: self.macros } - } - pub fn or(self, other: PerNs) -> PerNs { PerNs { types: self.types.or(other.types), @@ -79,9 +75,4 @@ impl PerNs { macros: self.macros.or(other.macros), } } - - /// Map types and values. Leave macros unchanged. - pub fn map(self, f: impl Fn(T) -> U) -> PerNs { - PerNs { types: self.types.map(&f), values: self.values.map(&f), macros: self.macros } - } } -- cgit v1.2.3