@@ -16,7 +16,8 @@ use crate::require_c_abi_if_c_variadic;
16
16
use rustc_ast:: TraitObjectSyntax ;
17
17
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
18
18
use rustc_errors:: {
19
- struct_span_err, Applicability , DiagnosticBuilder , ErrorGuaranteed , FatalError , MultiSpan ,
19
+ struct_span_err, Applicability , Diagnostic , DiagnosticBuilder , ErrorGuaranteed , FatalError ,
20
+ MultiSpan ,
20
21
} ;
21
22
use rustc_hir as hir;
22
23
use rustc_hir:: def:: { CtorOf , DefKind , Namespace , Res } ;
@@ -2106,7 +2107,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2106
2107
pub fn prohibit_generics < ' a > (
2107
2108
& self ,
2108
2109
segments : impl Iterator < Item = & ' a hir:: PathSegment < ' a > > + Clone ,
2109
- extend : impl Fn ( & mut DiagnosticBuilder < ' tcx , ErrorGuaranteed > ) ,
2110
+ extend : impl Fn ( & mut Diagnostic ) ,
2110
2111
) -> bool {
2111
2112
let args = segments. clone ( ) . flat_map ( |segment| segment. args ( ) . args ) ;
2112
2113
@@ -2984,11 +2985,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
2984
2985
}
2985
2986
2986
2987
/// Make sure that we are in the condition to suggest the blanket implementation.
2987
- fn maybe_lint_blanket_trait_impl < T : rustc_errors:: EmissionGuarantee > (
2988
- & self ,
2989
- self_ty : & hir:: Ty < ' _ > ,
2990
- diag : & mut DiagnosticBuilder < ' _ , T > ,
2991
- ) {
2988
+ fn maybe_lint_blanket_trait_impl ( & self , self_ty : & hir:: Ty < ' _ > , diag : & mut Diagnostic ) {
2992
2989
let tcx = self . tcx ( ) ;
2993
2990
let parent_id = tcx. hir ( ) . get_parent_item ( self_ty. hir_id ) ;
2994
2991
if let hir:: Node :: Item ( hir:: Item {
@@ -3081,7 +3078,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
3081
3078
sugg,
3082
3079
Applicability :: MachineApplicable ,
3083
3080
) ;
3084
- self . maybe_lint_blanket_trait_impl :: < ( ) > ( & self_ty, & mut diag) ;
3081
+ self . maybe_lint_blanket_trait_impl ( & self_ty, & mut diag) ;
3085
3082
diag. emit ( ) ;
3086
3083
} ,
3087
3084
) ;
0 commit comments