diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-06-25 12:58:21 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-02-13 11:49:52 +0100 |
| commit | 5eeff3f0733c83be9e0406874e92adf24a5cf2b6 (patch) | |
| tree | 4fa2d58bb73b45b99ccf1f74fb24a81ea93be9dd /compiler/rustc_interface/src/interface.rs | |
| parent | 9a60099cc43c8a07abb280be323d1ed9afc27f2c (diff) | |
| download | rust-5eeff3f0733c83be9e0406874e92adf24a5cf2b6.tar.gz rust-5eeff3f0733c83be9e0406874e92adf24a5cf2b6.zip | |
Remove Config::stderr
1. It captured stdout and not stderr 2. It isn't used anywhere 3. All error messages should go to the DiagnosticOutput instead 4. It modifies thread local state
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
| -rw-r--r-- | compiler/rustc_interface/src/interface.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 8bd24487b78..9a588b55393 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -21,7 +21,6 @@ use rustc_session::{DiagnosticOutput, Session}; use rustc_span::source_map::{FileLoader, FileName}; use std::path::PathBuf; use std::result; -use std::sync::{Arc, Mutex}; pub type Result<T> = result::Result<T, ErrorReported>; @@ -155,9 +154,6 @@ pub struct Config { pub file_loader: Option<Box<dyn FileLoader + Send + Sync>>, pub diagnostic_output: DiagnosticOutput, - /// Set to capture stderr output during compiler execution - pub stderr: Option<Arc<Mutex<Vec<u8>>>>, - pub lint_caps: FxHashMap<lint::LintId, lint::Level>, /// This is a callback from the driver that is called when [`ParseSess`] is created. @@ -237,13 +233,11 @@ pub fn create_compiler_and_run<R>(config: Config, f: impl FnOnce(&Compiler) -> R }) } -pub fn run_compiler<R: Send>(mut config: Config, f: impl FnOnce(&Compiler) -> R + Send) -> R { +pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Send) -> R { tracing::trace!("run_compiler"); - let stderr = config.stderr.take(); util::run_in_thread_pool_with_globals( config.opts.edition, config.opts.debugging_opts.threads, - &stderr, || create_compiler_and_run(config, f), ) } |
