diff options
| author | bors <bors@rust-lang.org> | 2023-08-31 06:20:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-31 06:20:39 +0000 |
| commit | 2518c0ffeb112b5ecf409c5ea7825b46bb3db8ec (patch) | |
| tree | c5f0f668af52a644dad21229e18c952893832fb1 /src/tools/rustfmt | |
| parent | d9c11c65ee93b6dfd0c71f17812c68d316fce183 (diff) | |
| parent | f57b41519dc3bd863650114c344e8e7db7a1cc2d (diff) | |
| download | rust-2518c0ffeb112b5ecf409c5ea7825b46bb3db8ec.tar.gz rust-2518c0ffeb112b5ecf409c5ea7825b46bb3db8ec.zip | |
Auto merge of #3044 - rust-lang:rustup-2023-08-31, r=RalfJung
Automatic sync from rustc
Diffstat (limited to 'src/tools/rustfmt')
| -rw-r--r-- | src/tools/rustfmt/src/parse/session.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tools/rustfmt/src/parse/session.rs b/src/tools/rustfmt/src/parse/session.rs index 945e3e42fdd..d815d69d6ba 100644 --- a/src/tools/rustfmt/src/parse/session.rs +++ b/src/tools/rustfmt/src/parse/session.rs @@ -1,8 +1,8 @@ use std::path::Path; use std::sync::atomic::{AtomicBool, Ordering}; -use rustc_data_structures::sync::{Lrc, Send}; -use rustc_errors::emitter::{Emitter, EmitterWriter}; +use rustc_data_structures::sync::{IntoDynSyncSend, Lrc}; +use rustc_errors::emitter::{DynEmitter, Emitter, EmitterWriter}; use rustc_errors::translation::Translate; use rustc_errors::{ColorConfig, Diagnostic, Handler, Level as DiagnosticLevel}; use rustc_session::parse::ParseSess as RawParseSess; @@ -48,15 +48,15 @@ impl Emitter for SilentEmitter { fn emit_diagnostic(&mut self, _db: &Diagnostic) {} } -fn silent_emitter() -> Box<dyn Emitter + Send> { +fn silent_emitter() -> Box<DynEmitter> { Box::new(SilentEmitter {}) } /// Emit errors against every files expect ones specified in the `ignore_path_set`. struct SilentOnIgnoredFilesEmitter { - ignore_path_set: Lrc<IgnorePathSet>, + ignore_path_set: IntoDynSyncSend<Lrc<IgnorePathSet>>, source_map: Lrc<SourceMap>, - emitter: Box<dyn Emitter + Send>, + emitter: Box<DynEmitter>, has_non_ignorable_parser_errors: bool, can_reset: Lrc<AtomicBool>, } @@ -145,7 +145,7 @@ fn default_handler( has_non_ignorable_parser_errors: false, source_map, emitter, - ignore_path_set, + ignore_path_set: IntoDynSyncSend(ignore_path_set), can_reset, })) } @@ -396,7 +396,7 @@ mod tests { has_non_ignorable_parser_errors: false, source_map, emitter: Box::new(emitter_writer), - ignore_path_set, + ignore_path_set: IntoDynSyncSend(ignore_path_set), can_reset, } } |
