@@ -2972,23 +2972,19 @@ impl<'tcx> LateLintPass<'tcx> for ClashingExternDeclarations {
2972
2972
let mut found_str = DiagnosticStyledString :: new ( ) ;
2973
2973
found_str. push ( this_decl_ty. fn_sig ( tcx) . to_string ( ) , true ) ;
2974
2974
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 ( ) )
2984
2982
. span_label (
2985
2983
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,
2991
2985
)
2986
+ . span_label ( get_relevant_span ( this_fi) , fluent:: lint:: mismatch_label)
2987
+ // FIXME(davidtwco): translatable expected/found
2992
2988
. note_expected_found ( & "" , expected_str, & "" , found_str)
2993
2989
. emit ( ) ;
2994
2990
} ,
0 commit comments