aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/proc_macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_expand/src/proc_macro.rs')
-rw-r--r--crates/hir_expand/src/proc_macro.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/hir_expand/src/proc_macro.rs b/crates/hir_expand/src/proc_macro.rs
index dbe1b446e..025e10239 100644
--- a/crates/hir_expand/src/proc_macro.rs
+++ b/crates/hir_expand/src/proc_macro.rs
@@ -45,13 +45,12 @@ impl ProcMacroExpander {
45 let proc_macro = krate_graph[self.krate] 45 let proc_macro = krate_graph[self.krate]
46 .proc_macro 46 .proc_macro
47 .get(id.0 as usize) 47 .get(id.0 as usize)
48 .clone()
49 .ok_or_else(|| err!("No derive macro found."))?; 48 .ok_or_else(|| err!("No derive macro found."))?;
50 49
51 // Proc macros have access to the environment variables of the invoking crate. 50 // Proc macros have access to the environment variables of the invoking crate.
52 let env = &krate_graph[calling_crate].env; 51 let env = &krate_graph[calling_crate].env;
53 52
54 proc_macro.expander.expand(&tt, attr_arg, &env).map_err(mbe::ExpandError::from) 53 proc_macro.expander.expand(tt, attr_arg, env).map_err(mbe::ExpandError::from)
55 } 54 }
56 None => Err(mbe::ExpandError::UnresolvedProcMacro), 55 None => Err(mbe::ExpandError::UnresolvedProcMacro),
57 } 56 }