@@ -2972,23 +2972,19 @@ impl<'tcx> LateLintPass<'tcx> for ClashingExternDeclarations {
29722972 let mut found_str = DiagnosticStyledString :: new ( ) ;
29732973 found_str. push ( this_decl_ty. fn_sig ( tcx) . to_string ( ) , true ) ;
29742974
2975- lint. build ( & format ! (
2976- "`{}` redeclare{} with a different signature" ,
2977- this_fi. ident. name,
2978- if orig. get_name( ) == this_fi. ident. name {
2979- "d" . to_string( )
2980- } else {
2981- format!( "s `{}`" , orig. get_name( ) )
2982- }
2983- ) )
2975+ lint. build ( if orig. get_name ( ) == this_fi. ident . name {
2976+ fluent:: lint:: builtin_clashing_extern_same_name
2977+ } else {
2978+ fluent:: lint:: builtin_clashing_extern_diff_name
2979+ } )
2980+ . set_arg ( "this_fi" , this_fi. ident . name )
2981+ . set_arg ( "orig" , orig. get_name ( ) )
29842982 . span_label (
29852983 get_relevant_span ( orig_fi) ,
2986- & format ! ( "`{}` previously declared here" , orig. get_name( ) ) ,
2987- )
2988- . span_label (
2989- get_relevant_span ( this_fi) ,
2990- "this signature doesn't match the previous declaration" ,
2984+ fluent:: lint:: previous_decl_label,
29912985 )
2986+ . span_label ( get_relevant_span ( this_fi) , fluent:: lint:: mismatch_label)
2987+ // FIXME(davidtwco): translatable expected/found
29922988 . note_expected_found ( & "" , expected_str, & "" , found_str)
29932989 . emit ( ) ;
29942990 } ,
0 commit comments