about summary refs log tree commit diff
path: root/src/librustc_allocator
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-04-06 00:15:49 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-05-21 18:17:05 +0200
commita1f2dceaebd21a6f8a5f9341bf41724bb20e2a7d (patch)
tree92928e104879c4c6aa37de8717d1c339999f35b1 /src/librustc_allocator
parent50a0defd5a93523067ef239936cc2e0755220904 (diff)
downloadrust-a1f2dceaebd21a6f8a5f9341bf41724bb20e2a7d.tar.gz
rust-a1f2dceaebd21a6f8a5f9341bf41724bb20e2a7d.zip
Move `edition` outside the hygiene lock and avoid accessing it
Diffstat (limited to 'src/librustc_allocator')
-rw-r--r--src/librustc_allocator/expand.rs4
1 files changed, 2 insertions, 2 deletions
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