use util::common::{duration_to_secs_str, ErrorReported};
use util::common::ProfileQueriesMsg;
-use rustc_data_structures::sync::{Lrc, Lock, LockCell, OneThread, Once, RwLock};
+use rustc_data_structures::sync::{self, Lrc, Lock, LockCell, OneThread, Once, RwLock};
use syntax::ast::NodeId;
use errors::{self, DiagnosticBuilder, DiagnosticId};
}
pub fn teach(&self, code: &DiagnosticId) -> bool {
- self.opts.debugging_opts.teach && !self.parse_sess.span_diagnostic.code_emitted(code)
+ self.opts.debugging_opts.teach && self.parse_sess.span_diagnostic.must_teach(code)
}
/// Are we allowed to use features from the Rust 2018 edition?
let external_macro_backtrace = sopts.debugging_opts.external_macro_backtrace;
- let emitter: Box<dyn Emitter> =
+ let emitter: Box<dyn Emitter + sync::Send> =
match (sopts.error_format, emitter_dest) {
(config::ErrorOutputType::HumanReadable(color_config), None) => Box::new(
EmitterWriter::stderr(
}
pub fn early_error(output: config::ErrorOutputType, msg: &str) -> ! {
- let emitter: Box<dyn Emitter> = match output {
+ let emitter: Box<dyn Emitter + sync::Send> = match output {
config::ErrorOutputType::HumanReadable(color_config) => {
Box::new(EmitterWriter::stderr(color_config, None, false, false))
}
}
pub fn early_warn(output: config::ErrorOutputType, msg: &str) {
- let emitter: Box<dyn Emitter> = match output {
+ let emitter: Box<dyn Emitter + sync::Send> = match output {
config::ErrorOutputType::HumanReadable(color_config) => {
Box::new(EmitterWriter::stderr(color_config, None, false, false))
}