Skip to content
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

Can still publicly re-export traits that inherit from private supertraits #17847

Closed
tomjakubowski opened this issue Oct 7, 2014 · 2 comments
Closed
Labels
A-trait-system Area: Trait system A-visibility Area: Visibility / privacy

Comments

@tomjakubowski
Copy link
Contributor

Example:

#![crate_type="lib"]
pub use a::Child;

mod a {
    pub trait Parent {}
    pub trait Child: Parent {}
}

Looks like this wasn't covered by #17401, but this seems wrong as part of RFC 48.

@kmcallister kmcallister added A-visibility Area: Visibility / privacy A-trait-system Area: Trait system labels Oct 7, 2014
@alexcrichton
Copy link
Member

This is actually working as-expected today, the amendment to the RFC states that an item is public if it's marked pub, end of story. That means that the Parent trait is indeed "public" in that sense, and this code should be accepted.

Can you clarify which part of RFC 48 you think forbids this? The amendment may not have updated all the examples! The section you highlighted, however, doesn't seem to forbid this code.

@tomjakubowski
Copy link
Contributor Author

Ahhhh. Mea culpa: I didn't carefully read what I linked to and was relying on my (now out of date!) memory of the RFC. Thanks for the link to the amendment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trait-system Area: Trait system A-visibility Area: Visibility / privacy
Projects
None yet
Development

No branches or pull requests

3 participants