diff options
Diffstat (limited to 'crates/hir_def/src/item_scope.rs')
-rw-r--r-- | crates/hir_def/src/item_scope.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/crates/hir_def/src/item_scope.rs b/crates/hir_def/src/item_scope.rs index 919933813..aafd73b60 100644 --- a/crates/hir_def/src/item_scope.rs +++ b/crates/hir_def/src/item_scope.rs | |||
@@ -168,37 +168,6 @@ impl ItemScope { | |||
168 | self.unnamed_trait_imports.insert(tr, vis); | 168 | self.unnamed_trait_imports.insert(tr, vis); |
169 | } | 169 | } |
170 | 170 | ||
171 | pub(crate) fn push_res(&mut self, name: Name, def: PerNs) -> bool { | ||
172 | let mut changed = false; | ||
173 | |||
174 | if let Some(types) = def.types { | ||
175 | self.types.entry(name.clone()).or_insert_with(|| { | ||
176 | changed = true; | ||
177 | types | ||
178 | }); | ||
179 | } | ||
180 | if let Some(values) = def.values { | ||
181 | self.values.entry(name.clone()).or_insert_with(|| { | ||
182 | changed = true; | ||
183 | values | ||
184 | }); | ||
185 | } | ||
186 | if let Some(macros) = def.macros { | ||
187 | self.macros.entry(name.clone()).or_insert_with(|| { | ||
188 | changed = true; | ||
189 | macros | ||
190 | }); | ||
191 | } | ||
192 | |||
193 | if def.is_none() { | ||
194 | if self.unresolved.insert(name) { | ||
195 | changed = true; | ||
196 | } | ||
197 | } | ||
198 | |||
199 | changed | ||
200 | } | ||
201 | |||
202 | pub(crate) fn push_res_with_import( | 171 | pub(crate) fn push_res_with_import( |
203 | &mut self, | 172 | &mut self, |
204 | glob_imports: &mut PerNsGlobImports, | 173 | glob_imports: &mut PerNsGlobImports, |