Skip to content

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

Merged
merged 7 commits into from
Sep 11, 2015
Merged

Conversation

GuillaumeGomez
Copy link
Member

```

To solve this error, please ensure the trait is accessible at the same level of
the type(s) on which it's implemented. Example:
Copy link
Member

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.

@GuillaumeGomez
Copy link
Member Author

Updated !

@GuillaumeGomez
Copy link
Member Author

It should be good (for now !).

@GuillaumeGomez GuillaumeGomez force-pushed the privacy branch 2 times, most recently from f1dfa7a to 5d18544 Compare September 9, 2015 13:21
@GuillaumeGomez
Copy link
Member Author

I added the other examples of erroneous code.

}
```

Since we cannot access inside function's elements, the visibility of its
Copy link
Member

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 ...

@GuillaumeGomez
Copy link
Member Author

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.
Copy link
Member

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, ..."

@GuillaumeGomez
Copy link
Member Author

Updated !

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 11, 2015

📌 Commit 0477976 has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Sep 11, 2015

⌛ Testing commit 0477976 with merge 942377e...

@bors
Copy link
Collaborator

bors commented Sep 11, 2015

⛄ The build was interrupted to prioritize another pull request.

@bors
Copy link
Collaborator

bors commented Sep 11, 2015

⌛ Testing commit 0477976 with merge 8e52875...

@bors bors merged commit 0477976 into rust-lang:master Sep 11, 2015
@GuillaumeGomez GuillaumeGomez deleted the privacy branch September 11, 2015 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants