From a1f2dceaebd21a6f8a5f9341bf41724bb20e2a7d Mon Sep 17 00:00:00 2001 From: John Kåre Alsaker Date: Sat, 6 Apr 2019 00:15:49 +0200 Subject: Move `edition` outside the hygiene lock and avoid accessing it --- src/librustc_allocator/expand.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librustc_allocator') diff --git a/src/librustc_allocator/expand.rs b/src/librustc_allocator/expand.rs index 6931b3542f7..0c19d770194 100644 --- a/src/librustc_allocator/expand.rs +++ b/src/librustc_allocator/expand.rs @@ -14,7 +14,7 @@ use syntax::{ base::{ExtCtxt, Resolver}, build::AstBuilder, expand::ExpansionConfig, - hygiene::{self, Mark, SyntaxContext}, + hygiene::{Mark, SyntaxContext}, }, mut_visit::{self, MutVisitor}, parse::ParseSess, @@ -96,7 +96,7 @@ impl MutVisitor for ExpandAllocatorDirectives<'_> { ].into()), allow_internal_unsafe: false, local_inner_macros: false, - edition: hygiene::default_edition(), + edition: self.sess.edition, }); // Tie the span to the macro expansion info we just created -- cgit 1.4.1-3-g733a5