File tree 4 files changed +22
-0
lines changed
compiler/rustc_ast_passes
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 =
273
273
.trait_impl = trait items always share the visibility of their trait
274
274
.individual_impl_items = place qualifiers on individual impl items instead
275
275
.individual_foreign_items = place qualifiers on individual foreign items instead
276
+ .help = remove the qualifier
276
277
277
278
ast_passes_where_clause_after_type_alias = where clauses are not allowed after the type for type aliases
278
279
.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 {
26
26
27
27
#[ derive( Diagnostic ) ]
28
28
#[ diag( ast_passes_visibility_not_permitted, code = E0449 ) ]
29
+ #[ help]
29
30
pub struct VisibilityNotPermitted {
30
31
#[ primary_span]
31
32
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