@@ -1166,10 +1166,10 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
11661166 GenericParamKind :: Lifetime { .. } => { }
11671167 GenericParamKind :: Type { .. } | GenericParamKind :: Const { .. } => {
11681168 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 )
11701170 . span_suggestion_short (
11711171 no_mangle_attr. span ,
1172- "remove this attribute" ,
1172+ fluent :: lint :: suggestion ,
11731173 "" ,
11741174 // Use of `#[no_mangle]` suggests FFI intent; correct
11751175 // fix may be to monomorphize source by hand
@@ -1193,8 +1193,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
11931193 // Const items do not refer to a particular location in memory, and therefore
11941194 // don't have anything to attach a symbol to
11951195 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) ;
11981197
11991198 // account for "pub const" (#45562)
12001199 let start = cx
@@ -1208,7 +1207,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidNoMangleItems {
12081207 let const_span = it. span . with_hi ( BytePos ( it. span . lo ( ) . 0 + start + 5 ) ) ;
12091208 err. span_suggestion (
12101209 const_span,
1211- "try a static value" ,
1210+ fluent :: lint :: suggestion ,
12121211 "pub static" ,
12131212 Applicability :: MachineApplicable ,
12141213 ) ;
0 commit comments