Skip to content

"private type in exported type signature" error does not check re-exports #19275

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

Closed
SimonSapin opened this issue Nov 24, 2014 · 1 comment
Closed

Comments

@SimonSapin
Copy link
Contributor

… apparently, or it would have caught #19271. It should, especially if libcore and other crates that libstd is a facade of can not be used directly in the stable channel.

That is, if a function, type, or trait is re-exported, all the signatures involved should also be checked for type that are not also reachable from the same crate. Otherwise it is possible to get a value of a type that can not be named, which this error tries to prevent in the first place.

@alexcrichton
Copy link
Member

The RFC from which this error originates defines a private type as one not marked pub, not one which is not reachable from the crate root. In this case the variants are all pub, so this error does not apply to them. Closing as working as intended (albeit unfortunately)

lnicola pushed a commit to lnicola/rust that referenced this issue Mar 10, 2025
Bump minimum supported toolchain to 1.82
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

No branches or pull requests

2 participants