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

Clean up private modules #2233

Merged
merged 1 commit into from
Oct 15, 2020
Merged

Clean up private modules #2233

merged 1 commit into from
Oct 15, 2020

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Oct 15, 2020

@taiki-e taiki-e requested a review from Nemo157 October 15, 2020 20:44

#[macro_use]
mod poll;
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is that issue, that seems to specifically be a bad interaction between a fix-suggestion and having a deny-lint active (deleting the pub use in the example there results in a working program).

It seems since we don't make futures-util::async_await a pub mod and instead pub use async_await::*; these can all be pub(crate) and still work.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, no, I didn't realise re-exports could further constrain the visibility of the re-exported item, rather than just having a visibility applied to the re-export itself. I think this is more likely rust-lang/rust#64762

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, it certainly seems more likely to be rust-lang/rust#64762.
(Actually, the code mentioned in this comment looks almost the same as in this PR's case, except for the module itself warned.)

* Merge into one module per crate.
* Rename to __private.
* Shortened path to some private items.
* Use '=' requirement to futures-macro to avoid breakage due to private API changes.
@taiki-e taiki-e merged commit f605139 into rust-lang:master Oct 15, 2020
@taiki-e taiki-e deleted the private branch October 15, 2020 22:06
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