@@ -1166,10 +1166,10 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
1166
1166
GenericParamKind :: Lifetime { .. } => { }
1167
1167
GenericParamKind :: Type { .. } | GenericParamKind :: Const { .. } => {
1168
1168
cx. struct_span_lint ( NO_MANGLE_GENERIC_ITEMS , span, |lint| {
1169
- lint. build ( "functions generic over types or consts must be mangled" )
1169
+ lint. build ( fluent :: lint :: builtin_no_mangle_generic )
1170
1170
. span_suggestion_short (
1171
1171
no_mangle_attr. span ,
1172
- "remove this attribute" ,
1172
+ fluent :: lint :: suggestion ,
1173
1173
"" ,
1174
1174
// Use of `#[no_mangle]` suggests FFI intent; correct
1175
1175
// fix may be to monomorphize source by hand
@@ -1193,8 +1193,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
1193
1193
// Const items do not refer to a particular location in memory, and therefore
1194
1194
// don't have anything to attach a symbol to
1195
1195
cx. struct_span_lint ( NO_MANGLE_CONST_ITEMS , it. span , |lint| {
1196
- let msg = "const items should never be `#[no_mangle]`" ;
1197
- let mut err = lint. build ( msg) ;
1196
+ let mut err = lint. build ( fluent:: lint:: builtin_const_no_mangle) ;
1198
1197
1199
1198
// account for "pub const" (#45562)
1200
1199
let start = cx
@@ -1208,7 +1207,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
1208
1207
let const_span = it. span . with_hi ( BytePos ( it. span . lo ( ) . 0 + start + 5 ) ) ;
1209
1208
err. span_suggestion (
1210
1209
const_span,
1211
- "try a static value" ,
1210
+ fluent :: lint :: suggestion ,
1212
1211
"pub static" ,
1213
1212
Applicability :: MachineApplicable ,
1214
1213
) ;
0 commit comments