diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-28 03:01:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-28 03:01:46 +0200 |
| commit | ca0cd73f498449de4aaf6ff9bd620838e21e9b59 (patch) | |
| tree | 280fcc7c01b7df71760dee45401de2416b681648 /src/libsyntax/parse | |
| parent | cb8b491a65d93fd08752347d6a237457830567fa (diff) | |
| parent | b5a0e6ea807bcdc71f145038dd1129c22dcf17fd (diff) | |
| download | rust-ca0cd73f498449de4aaf6ff9bd620838e21e9b59.tar.gz rust-ca0cd73f498449de4aaf6ff9bd620838e21e9b59.zip | |
Rollup merge of #62771 - petrochenkov:depext, r=eddyb
Break dependencies between `syntax_ext` and other crates Move `source_util` macros into `syntax_ext`. Move other early code generation facilities like standard library injection into `syntax_ext`. The only crate that depends on `syntax_ext` now is `rustc_interface` which is one of the "final" crates that depend on everything. Minor: Cleanup dependencies of `rustc_driver`, many of them are no longer used after introduction of `rustc_interface`. r? @eddyb
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index 52f65e1b474..3cd5464f357 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -794,7 +794,7 @@ mod tests { use std::path::PathBuf; use syntax_pos::{BytePos, Span, NO_EXPANSION, edition::Edition}; use rustc_data_structures::fx::{FxHashSet, FxHashMap}; - use rustc_data_structures::sync::Lock; + use rustc_data_structures::sync::{Lock, Once}; fn mk_sess(sm: Lrc<SourceMap>) -> ParseSess { let emitter = errors::emitter::EmitterWriter::new(Box::new(io::sink()), @@ -817,6 +817,7 @@ mod tests { param_attr_spans: Lock::new(Vec::new()), let_chains_spans: Lock::new(Vec::new()), async_closure_spans: Lock::new(Vec::new()), + injected_crate_name: Once::new(), } } diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 225065c1cf1..1aac8bbb7aa 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -10,9 +10,10 @@ use crate::parse::token::TokenKind; use crate::tokenstream::{TokenStream, TokenTree}; use crate::diagnostics::plugin::ErrorMap; use crate::print::pprust; +use crate::symbol::Symbol; use errors::{Applicability, FatalError, Level, Handler, ColorConfig, Diagnostic, DiagnosticBuilder}; -use rustc_data_structures::sync::{Lrc, Lock}; +use rustc_data_structures::sync::{Lrc, Lock, Once}; use syntax_pos::{Span, SourceFile, FileName, MultiSpan}; use syntax_pos::edition::Edition; @@ -58,6 +59,7 @@ pub struct ParseSess { pub let_chains_spans: Lock<Vec<Span>>, // Places where `async || ..` exprs were used and should be feature gated. pub async_closure_spans: Lock<Vec<Span>>, + pub injected_crate_name: Once<Symbol>, } impl ParseSess { @@ -86,6 +88,7 @@ impl ParseSess { param_attr_spans: Lock::new(Vec::new()), let_chains_spans: Lock::new(Vec::new()), async_closure_spans: Lock::new(Vec::new()), + injected_crate_name: Once::new(), } } |
