From db162df264a222021dbc7f1f93af94029f3948d9 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 27 Mar 2020 00:41:44 +0800 Subject: Remove deps on tt_mbe --- crates/ra_hir_expand/src/proc_macro.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_expand') diff --git a/crates/ra_hir_expand/src/proc_macro.rs b/crates/ra_hir_expand/src/proc_macro.rs index 296325b05..4d270e0de 100644 --- a/crates/ra_hir_expand/src/proc_macro.rs +++ b/crates/ra_hir_expand/src/proc_macro.rs @@ -23,9 +23,10 @@ impl ProcMacroExpander { let krate_graph = db.crate_graph(); let proc_macro = krate_graph[self.krate] .proc_macro - .get(self.proc_macro_id.0) + .get(self.proc_macro_id.0 as usize) .clone() .ok_or_else(|| mbe::ExpandError::ConversionError)?; - proc_macro.custom_derive(tt) + + proc_macro.expander.expand(&tt, None).map_err(mbe::ExpandError::from) } } -- cgit v1.2.3