File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed
compiler/rustc_ast_passes Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ ast_passes_visibility_not_permitted =
273273 .trait_impl = trait items always share the visibility of their trait
274274 .individual_impl_items = place qualifiers on individual impl items instead
275275 .individual_foreign_items = place qualifiers on individual foreign items instead
276+ .help = remove the qualifier
276277
277278ast_passes_where_clause_after_type_alias = where clauses are not allowed after the type for type aliases
278279 .note = see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ pub struct InvalidLabel {
2626
2727#[ derive( Diagnostic ) ]
2828#[ diag( ast_passes_visibility_not_permitted, code = E0449 ) ]
29+ #[ help]
2930pub struct VisibilityNotPermitted {
3031 #[ primary_span]
3132 pub span : Span ,
Original file line number Diff line number Diff line change 1+ trait Fun {
2+ pub fn test ( ) { }
3+ //~^ ERROR visibility qualifiers are not permitted here
4+ //~| NOTE trait items always share the visibility of their trait
5+ //~| HELP remove the qualifier
6+ }
7+
8+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0449]: visibility qualifiers are not permitted here
2+ --> $DIR/issue-123529.rs:2:5
3+ |
4+ LL | pub fn test() {}
5+ | ^^^
6+ |
7+ = help: remove the qualifier
8+ = note: trait items always share the visibility of their trait
9+
10+ error: aborting due to 1 previous error
11+
12+ For more information about this error, try `rustc --explain E0449`.
You can’t perform that action at this time.
0 commit comments