-
Notifications
You must be signed in to change notification settings - Fork 13.3k
False positive visible private types with super #25532
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
Comments
This is actually currently working as intended, the definition of "public" is that the target type is marked with |
Hmm... I think I can see why this is intended behaviour, but I'm not sure it's "correct". This snippet does not expose any types that would not be accessible by those that can see the method. There is a workaround by using the following snippet, but the fact that this workaround works could also be a bug. mod dir {
pub type Filesystem = super::Filesystem;
} |
The problem is that if The workaround you have reexports |
Referencing a private parent type with
super
in a public method of a private module generates an error, despite the type not being exposed outside its scope.(playpen http://is.gd/7Hhjfw)
The text was updated successfully, but these errors were encountered: