11/// This module provides types and traits for buffering lints until later in compilation.
22use rustc_ast:: node_id:: NodeId ;
33use rustc_data_structures:: fx:: FxIndexMap ;
4+ use rustc_data_structures:: sync:: { DynSend , DynSync } ;
45use rustc_error_messages:: MultiSpan ;
56use rustc_lint_defs:: { BuiltinLintDiag , Lint , LintId } ;
67
7- use crate :: { DynSend , LintDiagnostic , LintDiagnosticBox } ;
8+ use crate :: { LintDiagnostic , LintDiagnosticBox } ;
89
910/// We can't implement `LintDiagnostic` for `BuiltinLintDiag`, because decorating some of its
1011/// variants requires types we don't have yet. So, handle that case separately.
1112pub enum DecorateDiagCompat {
12- Dynamic ( Box < dyn for < ' a > LintDiagnosticBox < ' a , ( ) > + DynSend + ' static > ) ,
13+ Dynamic ( Box < dyn for < ' a > LintDiagnosticBox < ' a , ( ) > + DynSend + DynSync + ' static > ) ,
1314 Builtin ( BuiltinLintDiag ) ,
1415}
1516
@@ -21,7 +22,9 @@ impl std::fmt::Debug for DecorateDiagCompat {
2122
2223impl !LintDiagnostic < ' _ , ( ) > for BuiltinLintDiag { }
2324
24- impl < D : for < ' a > LintDiagnostic < ' a , ( ) > + DynSend + ' static > From < D > for DecorateDiagCompat {
25+ impl < D : for < ' a > LintDiagnostic < ' a , ( ) > + DynSend + DynSync + ' static > From < D >
26+ for DecorateDiagCompat
27+ {
2528 #[ inline]
2629 fn from ( d : D ) -> Self {
2730 Self :: Dynamic ( Box :: new ( d) )
0 commit comments