diff options
author | Jonas Schievink <[email protected]> | 2020-09-18 15:52:24 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-09-18 15:52:24 +0100 |
commit | 069045015c4b400754632c505f6ef19e32f9a4db (patch) | |
tree | 25cd5e2e0e97c179e3f6ca9484c8fa06138c0bbd /crates/hir_def/src/nameres | |
parent | 5486b70bc0fa1b6260178fa7e547a534d91c3e04 (diff) |
Remove obsolete proc macro collection code
The new attribute-based resolution takes care of this
Diffstat (limited to 'crates/hir_def/src/nameres')
-rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index 42c0f0536..28ef49488 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs | |||
@@ -260,25 +260,6 @@ impl DefCollector<'_> { | |||
260 | self.record_resolved_import(directive) | 260 | self.record_resolved_import(directive) |
261 | } | 261 | } |
262 | self.unresolved_imports = unresolved_imports; | 262 | self.unresolved_imports = unresolved_imports; |
263 | |||
264 | // Record proc-macros | ||
265 | self.collect_proc_macro(); | ||
266 | } | ||
267 | |||
268 | fn collect_proc_macro(&mut self) { | ||
269 | let proc_macros = std::mem::take(&mut self.proc_macros); | ||
270 | for (name, expander) in proc_macros { | ||
271 | let krate = self.def_map.krate; | ||
272 | |||
273 | let macro_id = MacroDefId { | ||
274 | ast_id: None, | ||
275 | krate: Some(krate), | ||
276 | kind: MacroDefKind::ProcMacro(expander), | ||
277 | local_inner: false, | ||
278 | }; | ||
279 | |||
280 | self.define_proc_macro(name.clone(), macro_id); | ||
281 | } | ||
282 | } | 263 | } |
283 | 264 | ||
284 | fn resolve_proc_macro(&mut self, name: &Name) { | 265 | fn resolve_proc_macro(&mut self, name: &Name) { |