@@ -19,10 +19,12 @@ use super::errors::{
19
19
InvalidRegisterClass , RegisterClassOnlyClobber , RegisterConflict ,
20
20
} ;
21
21
use super :: LoweringContext ;
22
- use crate :: { ImplTraitContext , ImplTraitPosition , ParamMode , ResolverAstLoweringExt } ;
22
+ use crate :: {
23
+ fluent_generated as fluent, ImplTraitContext , ImplTraitPosition , ParamMode ,
24
+ ResolverAstLoweringExt ,
25
+ } ;
23
26
24
27
impl < ' a , ' hir > LoweringContext < ' a , ' hir > {
25
- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
26
28
pub ( crate ) fn lower_inline_asm (
27
29
& mut self ,
28
30
sp : Span ,
@@ -52,7 +54,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
52
54
& self . tcx . sess ,
53
55
sym:: asm_experimental_arch,
54
56
sp,
55
- "inline assembly is not stable yet on this architecture" ,
57
+ fluent :: ast_lowering_unstable_inline_assembly ,
56
58
)
57
59
. emit ( ) ;
58
60
}
@@ -64,8 +66,13 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
64
66
self . dcx ( ) . emit_err ( AttSyntaxOnlyX86 { span : sp } ) ;
65
67
}
66
68
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 ( ) ;
69
76
}
70
77
71
78
let mut clobber_abis = FxIndexMap :: default ( ) ;
@@ -182,7 +189,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
182
189
sess,
183
190
sym:: asm_const,
184
191
* op_sp,
185
- "const operands for inline assembly are unstable" ,
192
+ fluent :: ast_lowering_unstable_inline_assembly_const_operands ,
186
193
)
187
194
. emit ( ) ;
188
195
}
@@ -246,7 +253,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
246
253
sess,
247
254
sym:: asm_goto,
248
255
* op_sp,
249
- "label operands for inline assembly are unstable" ,
256
+ fluent :: ast_lowering_unstable_inline_assembly_label_operands ,
250
257
)
251
258
. emit ( ) ;
252
259
}
0 commit comments