@@ -19,10 +19,12 @@ use super::errors::{
1919 InvalidRegisterClass , RegisterClassOnlyClobber , RegisterConflict ,
2020} ;
2121use super :: LoweringContext ;
22- use crate :: { ImplTraitContext , ImplTraitPosition , ParamMode , ResolverAstLoweringExt } ;
22+ use crate :: {
23+ fluent_generated as fluent, ImplTraitContext , ImplTraitPosition , ParamMode ,
24+ ResolverAstLoweringExt ,
25+ } ;
2326
2427impl < ' a , ' hir > LoweringContext < ' a , ' hir > {
25- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
2628 pub ( crate ) fn lower_inline_asm (
2729 & mut self ,
2830 sp : Span ,
@@ -52,7 +54,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
5254 & self . tcx . sess ,
5355 sym:: asm_experimental_arch,
5456 sp,
55- "inline assembly is not stable yet on this architecture" ,
57+ fluent :: ast_lowering_unstable_inline_assembly ,
5658 )
5759 . emit ( ) ;
5860 }
@@ -64,8 +66,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
6466 self . dcx ( ) . emit_err ( AttSyntaxOnlyX86 { span : sp } ) ;
6567 }
6668 if asm. options . contains ( InlineAsmOptions :: MAY_UNWIND ) && !self . tcx . features ( ) . asm_unwind {
67- feature_err ( & self . tcx . sess , sym:: asm_unwind, sp, "the `may_unwind` option is unstable" )
68- . emit ( ) ;
69+ feature_err (
70+ & self . tcx . sess ,
71+ sym:: asm_unwind,
72+ sp,
73+ fluent:: ast_lowering_unstable_may_unwind,
74+ )
75+ . emit ( ) ;
6976 }
7077
7178 let mut clobber_abis = FxIndexMap :: default ( ) ;
@@ -182,7 +189,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
182189 sess,
183190 sym:: asm_const,
184191 * op_sp,
185- "const operands for inline assembly are unstable" ,
192+ fluent :: ast_lowering_unstable_inline_assembly_const_operands ,
186193 )
187194 . emit ( ) ;
188195 }
@@ -246,7 +253,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
246253 sess,
247254 sym:: asm_goto,
248255 * op_sp,
249- "label operands for inline assembly are unstable" ,
256+ fluent :: ast_lowering_unstable_inline_assembly_label_operands ,
250257 )
251258 . emit ( ) ;
252259 }
0 commit comments