diff options
| author | Eric Huss <eric@huss.org> | 2024-11-20 17:12:56 -0800 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2024-11-20 17:28:47 -0800 |
| commit | 993e084eb1eb8bc29eae0620bbbb2c3009cec6dd (patch) | |
| tree | a7707931e8bdf0ce4bb35263aae12427327fe95b /compiler/rustc_resolve | |
| parent | a1838660c3820c74b987a1630c405ed5c575c70a (diff) | |
| download | rust-993e084eb1eb8bc29eae0620bbbb2c3009cec6dd.tar.gz rust-993e084eb1eb8bc29eae0620bbbb2c3009cec6dd.zip | |
Use edition of `macro_rules` when compiling the macro
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/def_collector.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/def_collector.rs b/compiler/rustc_resolve/src/def_collector.rs index bf27b767a49..7536869e2fe 100644 --- a/compiler/rustc_resolve/src/def_collector.rs +++ b/compiler/rustc_resolve/src/def_collector.rs @@ -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(); |
