File tree Expand file tree Collapse file tree 2 files changed +17
-15
lines changed
rustc_macros/src/diagnostics Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -393,16 +393,17 @@ impl Subdiagnostic for FrameNote {
393393 }
394394 let msg = diag. eagerly_translate ( inline_fluent ! (
395395 r#"{$times ->
396- [0] {const_eval_frame_note_inner}
397- *[other] [... {$times} additional calls {const_eval_frame_note_inner} ...]
398- }
399-
400- const_eval_frame_note_inner = inside {$where_ ->
401- [closure] closure
402- [instance] `{$instance}`
403- *[other] {""}
404- }
405- "#
396+ [0] inside {$where_ ->
397+ [closure] closure
398+ [instance] `{$instance}`
399+ *[other] {""}
400+ }
401+ *[other] [... {$times} additional calls inside {$where_ ->
402+ [closure] closure
403+ [instance] `{$instance}`
404+ *[other] {""}
405+ } ...]
406+ }"#
406407 ) ) ;
407408 diag. remove_arg ( "times" ) ;
408409 diag. remove_arg ( "where_" ) ;
Original file line number Diff line number Diff line change 1- use quote:: quote;
21use syn:: { LitStr , parse_macro_input} ;
2+ use crate :: diagnostics:: message:: Message ;
33
44pub ( crate ) fn inline_fluent ( input : proc_macro:: TokenStream ) -> proc_macro:: TokenStream {
55 let inline = parse_macro_input ! ( input as LitStr ) ;
6- quote ! {
7- rustc_errors:: DiagMessage :: Inline ( std:: borrow:: Cow :: Borrowed ( #inline) )
8- }
9- . into ( )
6+ let message = Message {
7+ message_span : inline. span ( ) ,
8+ value : inline. value ( ) ,
9+ } ;
10+ message. diag_message ( None ) . into ( )
1011}
You can’t perform that action at this time.
0 commit comments