File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -354,3 +354,7 @@ lint-builtin-mutable-transmutes =
354354 transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell
355355
356356lint-builtin-unstable-features = unstable feature
357+
358+ lint-builtin-unreachable-pub = unreachable `pub` { $what }
359+ .suggestion = consider restricting its visibility
360+ .help = or consider exporting it for use by other crates
Original file line number Diff line number Diff line change @@ -1385,16 +1385,17 @@ impl UnreachablePub {
13851385 }
13861386 let def_span = cx. tcx . sess . source_map ( ) . guess_head_span ( span) ;
13871387 cx. struct_span_lint ( UNREACHABLE_PUB , def_span, |lint| {
1388- let mut err = lint. build ( & format ! ( "unreachable `pub` {}" , what) ) ;
1388+ let mut err = lint. build ( fluent:: lint:: builtin_unreachable_pub) ;
1389+ err. set_arg ( "what" , what) ;
13891390
13901391 err. span_suggestion (
13911392 vis_span,
1392- "consider restricting its visibility" ,
1393+ fluent :: lint :: suggestion ,
13931394 "pub(crate)" ,
13941395 applicability,
13951396 ) ;
13961397 if exportable {
1397- err. help ( "or consider exporting it for use by other crates" ) ;
1398+ err. help ( fluent :: lint :: help ) ;
13981399 }
13991400 err. emit ( ) ;
14001401 } ) ;
You can’t perform that action at this time.
0 commit comments