Rollup merge of #49166 - dileepbapat:pr-49133, r=nikomatsakis
#49133 - Reworded the Error message: "`pub` not needed here" message
This commit is contained in:
commit
c152e98a75
2 changed files with 4 additions and 4 deletions
|
|
@ -67,7 +67,7 @@ impl<'a> AstValidator<'a> {
|
|||
E0449,
|
||||
"unnecessary visibility qualifier");
|
||||
if vis.node == VisibilityKind::Public {
|
||||
err.span_label(vis.span, "`pub` not needed here");
|
||||
err.span_label(vis.span, "`pub` not permitted here because it's implied");
|
||||
}
|
||||
if let Some(note) = note {
|
||||
err.note(note);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error[E0449]: unnecessary visibility qualifier
|
|||
--> $DIR/E0449.rs:17:1
|
||||
|
|
||||
LL | pub impl Bar {} //~ ERROR E0449
|
||||
| ^^^ `pub` not needed here
|
||||
| ^^^ `pub` not permitted here because it's implied
|
||||
|
|
||||
= note: place qualifiers on individual impl items instead
|
||||
|
||||
|
|
@ -10,13 +10,13 @@ error[E0449]: unnecessary visibility qualifier
|
|||
--> $DIR/E0449.rs:19:1
|
||||
|
|
||||
LL | pub impl Foo for Bar { //~ ERROR E0449
|
||||
| ^^^ `pub` not needed here
|
||||
| ^^^ `pub` not permitted here because it's implied
|
||||
|
||||
error[E0449]: unnecessary visibility qualifier
|
||||
--> $DIR/E0449.rs:20:5
|
||||
|
|
||||
LL | pub fn foo() {} //~ ERROR E0449
|
||||
| ^^^ `pub` not needed here
|
||||
| ^^^ `pub` not permitted here because it's implied
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue