diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-08-13 22:48:27 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-08-15 20:41:45 +0300 |
| commit | 74190a5e1c7439b001296fbc41da67682fd1d9bf (patch) | |
| tree | b1d989461ef6f3b70ebdabb1f1a53bdffeebff2f /src/libsyntax/parse/mod.rs | |
| parent | 1a447738b8a7ac8f0a47a134f9fa1a60a4621620 (diff) | |
| download | rust-74190a5e1c7439b001296fbc41da67682fd1d9bf.tar.gz rust-74190a5e1c7439b001296fbc41da67682fd1d9bf.zip | |
syntax_pos: Remove the duplicate global edition
It was introduced to avoid going through `hygiene_data`, but now it's read only once, when `ParseSess` is created, so going through a lock is ok.
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 80aa7a35266..a1bcc455eb4 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -16,6 +16,7 @@ use errors::{Applicability, FatalError, Level, Handler, ColorConfig, Diagnostic, use rustc_data_structures::sync::{Lrc, Lock, Once}; use syntax_pos::{Span, SourceFile, FileName, MultiSpan}; use syntax_pos::edition::Edition; +use syntax_pos::hygiene::ExpnId; use rustc_data_structures::fx::{FxHashSet, FxHashMap}; use std::borrow::Cow; @@ -86,7 +87,7 @@ impl ParseSess { included_mod_stack: Lock::new(vec![]), source_map, buffered_lints: Lock::new(vec![]), - edition: Edition::from_session(), + edition: ExpnId::root().expn_info().edition, ambiguous_block_expr_parse: Lock::new(FxHashMap::default()), param_attr_spans: Lock::new(Vec::new()), let_chains_spans: Lock::new(Vec::new()), |
