diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2023-04-11 12:18:50 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-11 12:18:50 +0900 |
| commit | 788de4701ee8b7aec26f3b4f332fecc81c1d0c83 (patch) | |
| tree | 93900259a780cebb931eee64343d4fbe296fe295 /tests/ui/error-codes | |
| parent | 5af6385f9f0d33c4aa611db5efd80f9ab1b4ffde (diff) | |
| parent | 4e5c120f33780c22923539f8a1e75b3959626cb3 (diff) | |
| download | rust-788de4701ee8b7aec26f3b4f332fecc81c1d0c83.tar.gz rust-788de4701ee8b7aec26f3b4f332fecc81c1d0c83.zip | |
Rollup merge of #109923 - ElectrifyPro:visibility, r=wesleywiser
Update `error [E0449]: unnecessary visibility qualifier` to be more clear This updates the error message `error[E0449]: unnecessary visibility qualifier` by clearly indicating that visibility qualifiers already inherit their visibility from a parent item. The error message previously implied that the qualifiers were permitted, which is not the case anymore. Resolves #109822.
Diffstat (limited to 'tests/ui/error-codes')
| -rw-r--r-- | tests/ui/error-codes/E0449.stderr | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/ui/error-codes/E0449.stderr b/tests/ui/error-codes/E0449.stderr index 8221a5e0ad6..cf41bcce8c2 100644 --- a/tests/ui/error-codes/E0449.stderr +++ b/tests/ui/error-codes/E0449.stderr @@ -1,22 +1,26 @@ -error[E0449]: unnecessary visibility qualifier +error[E0449]: visibility qualifiers are not permitted here --> $DIR/E0449.rs:7:1 | LL | pub impl Bar {} - | ^^^ `pub` not permitted here because it's implied + | ^^^ | = note: place qualifiers on individual impl items instead -error[E0449]: unnecessary visibility qualifier +error[E0449]: visibility qualifiers are not permitted here --> $DIR/E0449.rs:9:1 | LL | pub impl Foo for Bar { - | ^^^ `pub` not permitted here because it's implied + | ^^^ + | + = note: trait items always share the visibility of their trait -error[E0449]: unnecessary visibility qualifier +error[E0449]: visibility qualifiers are not permitted here --> $DIR/E0449.rs:10:5 | LL | pub fn foo() {} - | ^^^ `pub` not permitted here because it's implied + | ^^^ + | + = note: trait items always share the visibility of their trait error: aborting due to 3 previous errors |
