-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking issue for vNext edition prelude #65512
Comments
|
|
Can I also suggest an AFAIK implementing A similar approach is currently to expose slice concatenation methods for technical reasons I still don't quite understand. So this approach, while unusual, is not completely unheard of. |
In addition to
I wouldn't add |
|
@eaglgenes101 The problem with #25725 is not collision with methods of other traits from other crates, but collision of Having a new dedicated trait does not change the problem if the method is still named |
I have previously suggested adding |
I would love to see the following in an updated prelude:
I've based these on things I see imported heavily, and some greps for commonly imported bits of I'm also tempted to request |
@mbrubeck @joshtriplett Aside for |
structopt, kuchiki, micromath, and clapme have trait methods that could conflict with Of these, My best guess is that adding |
Here's one that may be slightly controversial — remove |
+1 I've been writing Rust for around 2 years now, and I never realized until now that |
I'm regularly using |
@kornelski Is it something that most people use on a regular basis though? Other items in the prelude are used all the time by a lot of people. |
I use I think removal of drop is an unnecessary churn:
|
Error I'm sure breaks someone. HashMap and HashSet probably break people as well. |
As far as my understanding goes, adding types (as opposed to traits) to the prelude is not a breaking change. Prelude is shadowed by glob and explicit imports. |
We talked about this in the lang team triage meeting today, in the context of rust-lang/lang-team#44. The zulip thread (https://rust-lang.zulipchat.com/#narrow/stream/243200-t-lang.2Fmajor-changes/topic/MCP.3A.20per-edition.20preludes.20lang-team.2344/near/205701158) raised a question about how this is going to interact with name resolution in macros. We'd appreciate it if someone in the community could take a deep dive into the best way to resolve this specific question, as overall we'd probably like to do this. |
Here's something that I just ran across: the only |
Adding |
Across this lengthy thread in internals we can see that there are many people, myself included, who would like for I thus suggest that the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cc #82217 |
I've posted an initial take on an RFC for this: rust-lang/rfcs#3090. Please comment there. |
This has been implemented and is shipping in Rust 1.56 as part of Rust 2021. |
There were plans to do this for the 2018 edition, but it never happened (#51418, #51434)
Things to consider:
Note 2020-04-19: Please limit suggestions here to things that would be breaking changes to do in the current prelude. Some prelude additions can happen without being a breaking change, and if you'd like to do one of those them just talk with libs about it -- it doesn't need to wait.
The text was updated successfully, but these errors were encountered: