@@ -17,7 +17,7 @@ use rustc_span::def_id::{DefId, LOCAL_CRATE};
1717use rustc_span:: symbol:: { sym, Symbol } ;
1818use rustc_target:: spec:: abi:: Abi ;
1919
20- use crate :: errors;
20+ use crate :: { errors, fluent_generated } ;
2121
2222pub fn find_native_static_library ( name : & str , verbatim : bool , sess : & Session ) -> PathBuf {
2323 let formats = if verbatim {
@@ -87,7 +87,6 @@ struct Collector<'tcx> {
8787}
8888
8989impl < ' tcx > Collector < ' tcx > {
90- #[ allow( rustc:: untranslatable_diagnostic) ] // FIXME: make this translatable
9190 fn process_module ( & mut self , module : & ForeignModule ) {
9291 let ForeignModule { def_id, abi, ref foreign_items } = * module;
9392 let def_id = def_id. expect_local ( ) ;
@@ -161,7 +160,7 @@ impl<'tcx> Collector<'tcx> {
161160 sess,
162161 sym:: link_arg_attribute,
163162 span,
164- "link kind `link-arg` is unstable" ,
163+ fluent_generated :: metadata_link_arg_unstable ,
165164 )
166165 . emit ( ) ;
167166 }
@@ -201,8 +200,13 @@ impl<'tcx> Collector<'tcx> {
201200 continue ;
202201 } ;
203202 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 ( ) ;
206210 }
207211 cfg = Some ( link_cfg. clone ( ) ) ;
208212 }
@@ -266,6 +270,8 @@ impl<'tcx> Collector<'tcx> {
266270
267271 macro report_unstable_modifier ( $feature: ident) {
268272 if !features. $feature {
273+ // FIXME: make this translatable
274+ #[ expect( rustc:: untranslatable_diagnostic) ]
269275 feature_err (
270276 sess,
271277 sym:: $feature,
0 commit comments