aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
diff options
context:
space:
mode:
authorIgor Aleksanov <[email protected]>2020-10-04 05:39:35 +0100
committerIgor Aleksanov <[email protected]>2020-10-12 09:05:00 +0100
commitb42562b5dee4f4ce23094c7bab6406e3b00f90ad (patch)
tree8711713d749b19f22a534bb3dd1925063d1baade /crates/hir_def/src
parent9ec1741b651bd13e4e5e6224f2e2c5c503846a6b (diff)
Make incorrect case diagnostic work inside of functions
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r--crates/hir_def/src/item_scope.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/hir_def/src/item_scope.rs b/crates/hir_def/src/item_scope.rs
index 12c24e1ca..a8b3fe844 100644
--- a/crates/hir_def/src/item_scope.rs
+++ b/crates/hir_def/src/item_scope.rs
@@ -95,6 +95,12 @@ impl ItemScope {
95 self.impls.iter().copied() 95 self.impls.iter().copied()
96 } 96 }
97 97
98 pub fn values(
99 &self,
100 ) -> impl Iterator<Item = (ModuleDefId, Visibility)> + ExactSizeIterator + '_ {
101 self.values.values().copied()
102 }
103
98 pub fn visibility_of(&self, def: ModuleDefId) -> Option<Visibility> { 104 pub fn visibility_of(&self, def: ModuleDefId) -> Option<Visibility> {
99 self.name_of(ItemInNs::Types(def)) 105 self.name_of(ItemInNs::Types(def))
100 .or_else(|| self.name_of(ItemInNs::Values(def))) 106 .or_else(|| self.name_of(ItemInNs::Values(def)))