@@ -14,7 +14,7 @@ use rustc_hir::{AmbigArg, ItemKind, find_attr};
1414use rustc_infer:: infer:: outlives:: env:: OutlivesEnvironment ;
1515use rustc_infer:: infer:: { self , InferCtxt , SubregionOrigin , TyCtxtInferExt } ;
1616use rustc_lint_defs:: builtin:: SHADOWING_SUPERTRAIT_ITEMS ;
17- use rustc_macros:: LintDiagnostic ;
17+ use rustc_macros:: Diagnostic ;
1818use rustc_middle:: mir:: interpret:: ErrorHandled ;
1919use rustc_middle:: traits:: solve:: NoSolution ;
2020use rustc_middle:: ty:: trait_def:: TraitSpecializationKind ;
@@ -797,7 +797,7 @@ fn lint_item_shadowing_supertrait_item<'tcx>(tcx: TyCtxt<'tcx>, trait_item_def_i
797797 errors:: SupertraitItemShadowee :: Several { traits : traits. into ( ) , spans : spans. into ( ) }
798798 } ;
799799
800- tcx. emit_node_span_lint (
800+ tcx. emit_diag_node_span_lint (
801801 SHADOWING_SUPERTRAIT_ITEMS ,
802802 tcx. local_def_id_to_hir_id ( trait_item_def_id) ,
803803 tcx. def_span ( trait_item_def_id) ,
@@ -2458,7 +2458,7 @@ fn lint_redundant_lifetimes<'tcx>(
24582458 && outlives_env. free_region_map ( ) . sub_free_regions ( tcx, victim, candidate)
24592459 {
24602460 shadowed. insert ( victim) ;
2461- tcx. emit_node_span_lint (
2461+ tcx. emit_diag_node_span_lint (
24622462 rustc_lint_defs:: builtin:: REDUNDANT_LIFETIMES ,
24632463 tcx. local_def_id_to_hir_id ( def_id. expect_local ( ) ) ,
24642464 tcx. def_span ( def_id) ,
@@ -2469,7 +2469,7 @@ fn lint_redundant_lifetimes<'tcx>(
24692469 }
24702470}
24712471
2472- #[ derive( LintDiagnostic ) ]
2472+ #[ derive( Diagnostic ) ]
24732473#[ diag( "unnecessary lifetime parameter `{$victim}`" ) ]
24742474#[ note( "you can use the `{$candidate}` lifetime directly, in place of `{$victim}`" ) ]
24752475struct RedundantLifetimeArgsLint < ' tcx > {
0 commit comments