-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add new error codes on privacy checking #28312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
``` | ||
|
||
To solve this error, please ensure the trait is accessible at the same level of | ||
the type(s) on which it's implemented. Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensure that the trait is also public and accessible at the same level of the public functions or types which are bound on it.
5b8d29c
to
42e1622
Compare
Updated ! |
068b727
to
bda7ec0
Compare
It should be good (for now !). |
f1dfa7a
to
5d18544
Compare
I added the other examples of erroneous code. |
5d18544
to
dfd6963
Compare
} | ||
``` | ||
|
||
Since we cannot access inside function's elements, the visibility of its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we cannot access items defined inside a function, the visibility of its items does ...
dfd6963
to
5c21a43
Compare
Updated ! |
To fix this error, please remove the visibility qualifier when it is not | ||
required. Also, directly implemented methods share the visibility of the type | ||
itself and trait methods share the visibility of the trait, so `pub` is | ||
unnecessary in either case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go before the fix. Explain the problem first, then the solution.
Something like
"Directly implemented methods .... in either case.
To fix this error, ..."
5c21a43
to
0477976
Compare
Updated ! |
@bors r+ rollup |
📌 Commit 0477976 has been approved by |
⌛ Testing commit 0477976 with merge 942377e... |
⛄ The build was interrupted to prioritize another pull request. |
r? @Manishearth