aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/per_ns.rs9
1 files changed, 0 insertions, 9 deletions
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<T> PerNs<T> {
68 PerNs { types: None, values: None, macros: self.macros } 68 PerNs { types: None, values: None, macros: self.macros }
69 } 69 }
70 70
71 pub fn as_ref(&self) -> PerNs<&T> {
72 PerNs { types: self.types.as_ref(), values: self.values.as_ref(), macros: self.macros }
73 }
74
75 pub fn or(self, other: PerNs<T>) -> PerNs<T> { 71 pub fn or(self, other: PerNs<T>) -> PerNs<T> {
76 PerNs { 72 PerNs {
77 types: self.types.or(other.types), 73 types: self.types.or(other.types),
@@ -79,9 +75,4 @@ impl<T> PerNs<T> {
79 macros: self.macros.or(other.macros), 75 macros: self.macros.or(other.macros),
80 } 76 }
81 } 77 }
82
83 /// Map types and values. Leave macros unchanged.
84 pub fn map<U>(self, f: impl Fn(T) -> U) -> PerNs<U> {
85 PerNs { types: self.types.map(&f), values: self.values.map(&f), macros: self.macros }
86 }
87} 78}