1
Fork 0

Use edition of macro_rules when compiling the macro

This commit is contained in:
Eric Huss 2024-11-20 17:12:56 -08:00
parent a1838660c3
commit 993e084eb1
6 changed files with 4 additions and 34 deletions

View file

@ -191,7 +191,7 @@ impl<'a, 'ra, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'ra, 'tcx> {
ItemKind::Const(..) => DefKind::Const,
ItemKind::Fn(..) | ItemKind::Delegation(..) => DefKind::Fn,
ItemKind::MacroDef(def) => {
let edition = self.resolver.tcx.sess.edition();
let edition = i.span.edition();
let macro_data =
self.resolver.compile_macro(def, i.ident, &i.attrs, i.span, i.id, edition);
let macro_kind = macro_data.ext.macro_kind();