implement MacroData

This commit is contained in:
Takayuki Maeda 2022-06-15 00:31:21 +09:00
parent 60a50d02ab
commit 0d24405211
5 changed files with 34 additions and 28 deletions

View file

@ -241,7 +241,7 @@ impl<'a> Resolver<'a> {
{
// 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);
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)