@@ -17,7 +17,7 @@ use rustc_span::def_id::{DefId, LOCAL_CRATE};
17
17
use rustc_span:: symbol:: { sym, Symbol } ;
18
18
use rustc_target:: spec:: abi:: Abi ;
19
19
20
- use crate :: errors;
20
+ use crate :: { errors, fluent_generated } ;
21
21
22
22
pub fn find_native_static_library ( name : & str , verbatim : bool , sess : & Session ) -> PathBuf {
23
23
let formats = if verbatim {
@@ -87,7 +87,6 @@ struct Collector<'tcx> {
87
87
}
88
88
89
89
impl < ' tcx > Collector < ' tcx > {
90
- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
91
90
fn process_module ( & mut self , module : & ForeignModule ) {
92
91
let ForeignModule { def_id, abi, ref foreign_items } = * module;
93
92
let def_id = def_id. expect_local ( ) ;
@@ -161,7 +160,7 @@ impl<'tcx> Collector<'tcx> {
161
160
sess,
162
161
sym:: link_arg_attribute,
163
162
span,
164
- "link kind `link-arg` is unstable" ,
163
+ fluent_generated :: metadata_link_arg_unstable ,
165
164
)
166
165
. emit ( ) ;
167
166
}
@@ -201,8 +200,13 @@ impl<'tcx> Collector<'tcx> {
201
200
continue ;
202
201
} ;
203
202
if !features. link_cfg {
204
- feature_err ( sess, sym:: link_cfg, item. span ( ) , "link cfg is unstable" )
205
- . emit ( ) ;
203
+ feature_err (
204
+ sess,
205
+ sym:: link_cfg,
206
+ item. span ( ) ,
207
+ fluent_generated:: metadata_link_cfg_unstable,
208
+ )
209
+ . emit ( ) ;
206
210
}
207
211
cfg = Some ( link_cfg. clone ( ) ) ;
208
212
}
@@ -266,6 +270,8 @@ impl<'tcx> Collector<'tcx> {
266
270
267
271
macro report_unstable_modifier ( $feature: ident) {
268
272
if !features. $feature {
273
+ // FIXME: make this translatable
274
+ #[ expect( rustc:: untranslatable_diagnostic) ]
269
275
feature_err (
270
276
sess,
271
277
sym:: $feature,
0 commit comments