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

Make all extension traits unnamed in the prelude #1662

Merged
merged 2 commits into from
Jun 7, 2019

Conversation

Nemo157
Copy link
Member

@Nemo157 Nemo157 commented Jun 6, 2019

This is useful for avoiding accidental shadowing of glob imported preludes, the methods will be brought into scope but the trait itself will have no name so can't be shadowed by things like use futures_timer::FutureExt;.

Unfortunately rustdoc doesn't render these well, but hopefully that can get fixed at some point

Screenshot 2019-06-06 at 18 50 37

Copy link
Contributor

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

Nice idea!

@Nemo157
Copy link
Member Author

Nemo157 commented Jun 6, 2019

Opened rust-lang/rust#61592 to try and have nicer docs eventually.

@taiki-e
Copy link
Member

taiki-e commented Jun 6, 2019

CI fail is because a new minor version of rand_core has been released. I am writing a fix for this now.

@taiki-e
Copy link
Member

taiki-e commented Jun 6, 2019

Opened #1664 for fixing CI fail.

@Nemo157
Copy link
Member Author

Nemo157 commented Jun 7, 2019

Updated to use doc(no_inline) so it now renders like this:

@cramertj
Copy link
Member

cramertj commented Jun 7, 2019

NIce, that's a good trick! :)

@cramertj cramertj merged commit e173151 into rust-lang:master Jun 7, 2019
@Nemo157 Nemo157 deleted the unnamed-extensions branch June 7, 2019 21:30
redtankd added a commit to redtankd/rust-test that referenced this pull request Aug 4, 2019
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.

5 participants