aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-11 14:30:35 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-11 14:30:35 +0000
commit6596793c0ce24b10c599b7d8b34483595d9a4511 (patch)
treedaf3d195a675e44045a843b29b379b7097a170ac /crates/ra_hir/src/nameres.rs
parent821d980fd950679315bb12659a13347233895e67 (diff)
parent8cafdb3a99d7e5f91dd89dd83884d964aa6e1fda (diff)
Merge #787
787: rename combine -> or r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/nameres.rs')
-rw-r--r--crates/ra_hir/src/nameres.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index 4b8097235..261ebdf97 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -135,7 +135,7 @@ impl<T> PerNs<T> {
135 PerNs { types: self.types.as_ref(), values: self.values.as_ref() } 135 PerNs { types: self.types.as_ref(), values: self.values.as_ref() }
136 } 136 }
137 137
138 pub fn combine(self, other: PerNs<T>) -> PerNs<T> { 138 pub fn or(self, other: PerNs<T>) -> PerNs<T> {
139 PerNs { types: self.types.or(other.types), values: self.values.or(other.values) } 139 PerNs { types: self.types.or(other.types), values: self.values.or(other.values) }
140 } 140 }
141 141
@@ -439,7 +439,7 @@ impl ItemMap {
439 let from_extern_prelude = 439 let from_extern_prelude =
440 self.extern_prelude.get(name).map_or(PerNs::none(), |&it| PerNs::types(it)); 440 self.extern_prelude.get(name).map_or(PerNs::none(), |&it| PerNs::types(it));
441 441
442 from_scope.combine(from_extern_prelude) 442 from_scope.or(from_extern_prelude)
443 } 443 }
444 444
445 // Returns Yes if we are sure that additions to `ItemMap` wouldn't change 445 // Returns Yes if we are sure that additions to `ItemMap` wouldn't change