Skip to content

Commit dc0fb52

Browse files
committed
Require lints to be Send + Sync
1 parent 5d128cd commit dc0fb52

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc/lint/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
pub use self::Level::*;
3232
pub use self::LintSource::*;
3333

34-
use rustc_data_structures::sync::Lrc;
34+
use rustc_data_structures::sync::{self, Lrc};
3535

3636
use errors::{DiagnosticBuilder, DiagnosticId};
3737
use hir::def_id::{CrateNum, LOCAL_CRATE};
@@ -287,8 +287,9 @@ pub trait EarlyLintPass: LintPass {
287287
}
288288

289289
/// A lint pass boxed up as a trait object.
290-
pub type EarlyLintPassObject = Box<dyn EarlyLintPass + 'static>;
291-
pub type LateLintPassObject = Box<dyn for<'a, 'tcx> LateLintPass<'a, 'tcx> + 'static>;
290+
pub type EarlyLintPassObject = Box<dyn EarlyLintPass + sync::Send + sync::Sync + 'static>;
291+
pub type LateLintPassObject = Box<dyn for<'a, 'tcx> LateLintPass<'a, 'tcx> + sync::Send
292+
+ sync::Sync + 'static>;
292293

293294
/// Identifies a lint known to the compiler.
294295
#[derive(Clone, Copy, Debug)]

0 commit comments

Comments
 (0)