resolve: Avoid clones of MacroData
And move declarative macro compilation to an earlier point in def collector, which is required for #118188.
This commit is contained in:
parent
0f696e555f
commit
ad0770eeee
5 changed files with 52 additions and 55 deletions
|
@ -240,7 +240,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
{
|
||||
// The macro is a proc macro derive
|
||||
if let Some(def_id) = module.expansion.expn_data().macro_def_id {
|
||||
let ext = self.get_macro_by_def_id(def_id).ext;
|
||||
let ext = &self.get_macro_by_def_id(def_id).ext;
|
||||
if ext.builtin_name.is_none()
|
||||
&& ext.macro_kind() == MacroKind::Derive
|
||||
&& parent.expansion.outer_expn_is_descendant_of(*ctxt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue