Skip to content

Conversation

@petrochenkov
Copy link
Contributor

Hi.
rust-lang/rust#42125 is going to turn some old compatibility "private-in-public" warnings in rustc into hard errors.
crates.io testing discovered that published version of this crate is affected by one of those errors.
This PR updates the code to build successfully with rust-lang/rust#42125

@@ -1,8 +1,3 @@
// I don't see **any** reason for this waring to enabled. We only build binary
// and most of these warnings do not apply to real visibility of types inside
// the crate
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is that private types cannot be leaked from modules they are defined in, so if you see a private type you have a guarantee that it's restricted to this module.
These crate wants to leak private types like UpstreamValidator from their module, therefore the error.

If UpstreamValidator and friends are intended to be implementation details (1), but still leaked in some form (2) (e.g. through aliases), they have to be marked as pub (because 2), but made "unnameable" by placing them into a private module (because 1).
(The tracking issue for private_in_public contains a similar example.)

@tailhook tailhook merged commit 8a8daf5 into swindon-rs:master May 27, 2017
@tailhook
Copy link
Collaborator

Good to know. Thanks!

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.

2 participants