|
1 | 1 | use std::path::Path; |
2 | 2 | use std::sync::atomic::{AtomicBool, Ordering}; |
3 | 3 |
|
4 | | -use rustc_data_structures::sync::{Lrc, Send}; |
5 | | -use rustc_errors::emitter::{Emitter, EmitterWriter}; |
| 4 | +use rustc_data_structures::sync::{IntoDynSyncSend, Lrc}; |
| 5 | +use rustc_errors::emitter::{DynEmitter, Emitter, EmitterWriter}; |
6 | 6 | use rustc_errors::translation::Translate; |
7 | 7 | use rustc_errors::{ColorConfig, Diagnostic, Handler, Level as DiagnosticLevel}; |
8 | 8 | use rustc_session::parse::ParseSess as RawParseSess; |
@@ -48,15 +48,15 @@ impl Emitter for SilentEmitter { |
48 | 48 | fn emit_diagnostic(&mut self, _db: &Diagnostic) {} |
49 | 49 | } |
50 | 50 |
|
51 | | -fn silent_emitter() -> Box<dyn Emitter + Send> { |
| 51 | +fn silent_emitter() -> Box<DynEmitter> { |
52 | 52 | Box::new(SilentEmitter {}) |
53 | 53 | } |
54 | 54 |
|
55 | 55 | /// Emit errors against every files expect ones specified in the `ignore_path_set`. |
56 | 56 | struct SilentOnIgnoredFilesEmitter { |
57 | | - ignore_path_set: Lrc<IgnorePathSet>, |
| 57 | + ignore_path_set: IntoDynSyncSend<Lrc<IgnorePathSet>>, |
58 | 58 | source_map: Lrc<SourceMap>, |
59 | | - emitter: Box<dyn Emitter + Send>, |
| 59 | + emitter: Box<DynEmitter>, |
60 | 60 | has_non_ignorable_parser_errors: bool, |
61 | 61 | can_reset: Lrc<AtomicBool>, |
62 | 62 | } |
@@ -145,7 +145,7 @@ fn default_handler( |
145 | 145 | has_non_ignorable_parser_errors: false, |
146 | 146 | source_map, |
147 | 147 | emitter, |
148 | | - ignore_path_set, |
| 148 | + ignore_path_set: IntoDynSyncSend(ignore_path_set), |
149 | 149 | can_reset, |
150 | 150 | })) |
151 | 151 | } |
@@ -396,7 +396,7 @@ mod tests { |
396 | 396 | has_non_ignorable_parser_errors: false, |
397 | 397 | source_map, |
398 | 398 | emitter: Box::new(emitter_writer), |
399 | | - ignore_path_set, |
| 399 | + ignore_path_set: IntoDynSyncSend(ignore_path_set), |
400 | 400 | can_reset, |
401 | 401 | } |
402 | 402 | } |
|
0 commit comments