@@ -16,7 +16,8 @@ use crate::require_c_abi_if_c_variadic;
1616use rustc_ast:: TraitObjectSyntax ;
1717use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
1818use rustc_errors:: {
19- struct_span_err, Applicability , DiagnosticBuilder , ErrorGuaranteed , FatalError , MultiSpan ,
19+ struct_span_err, Applicability , Diagnostic , DiagnosticBuilder , ErrorGuaranteed , FatalError ,
20+ MultiSpan ,
2021} ;
2122use rustc_hir as hir;
2223use rustc_hir:: def:: { CtorOf , DefKind , Namespace , Res } ;
@@ -2106,7 +2107,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
21062107 pub fn prohibit_generics < ' a > (
21072108 & self ,
21082109 segments : impl Iterator < Item = & ' a hir:: PathSegment < ' a > > + Clone ,
2109- extend : impl Fn ( & mut DiagnosticBuilder < ' tcx , ErrorGuaranteed > ) ,
2110+ extend : impl Fn ( & mut Diagnostic ) ,
21102111 ) -> bool {
21112112 let args = segments. clone ( ) . flat_map ( |segment| segment. args ( ) . args ) ;
21122113
@@ -2984,11 +2985,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
29842985 }
29852986
29862987 /// 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 ) {
29922989 let tcx = self . tcx ( ) ;
29932990 let parent_id = tcx. hir ( ) . get_parent_item ( self_ty. hir_id ) ;
29942991 if let hir:: Node :: Item ( hir:: Item {
@@ -3081,7 +3078,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
30813078 sugg,
30823079 Applicability :: MachineApplicable ,
30833080 ) ;
3084- self . maybe_lint_blanket_trait_impl :: < ( ) > ( & self_ty, & mut diag) ;
3081+ self . maybe_lint_blanket_trait_impl ( & self_ty, & mut diag) ;
30853082 diag. emit ( ) ;
30863083 } ,
30873084 ) ;
0 commit comments