Require lints to be Send + Sync

This commit is contained in:
John Kåre Alsaker 2018-03-03 06:18:09 +01:00
parent 5d128cdca8
commit dc0fb52fcc

View file

@ -31,7 +31,7 @@
pub use self::Level::*;
pub use self::LintSource::*;
use rustc_data_structures::sync::Lrc;
use rustc_data_structures::sync::{self, Lrc};
use errors::{DiagnosticBuilder, DiagnosticId};
use hir::def_id::{CrateNum, LOCAL_CRATE};
@ -287,8 +287,9 @@ pub trait EarlyLintPass: LintPass {
}
/// A lint pass boxed up as a trait object.
pub type EarlyLintPassObject = Box<dyn EarlyLintPass + 'static>;
pub type LateLintPassObject = Box<dyn for<'a, 'tcx> LateLintPass<'a, 'tcx> + 'static>;
pub type EarlyLintPassObject = Box<dyn EarlyLintPass + sync::Send + sync::Sync + 'static>;
pub type LateLintPassObject = Box<dyn for<'a, 'tcx> LateLintPass<'a, 'tcx> + sync::Send
+ sync::Sync + 'static>;
/// Identifies a lint known to the compiler.
#[derive(Clone, Copy, Debug)]