-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Consistent no_prelude attribute #32025
Conversation
I'm tempted to leave the deprecation until Since the behaviour of |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Reviewed, LGTM except that I don't think we should deprecate |
@@ -15,6 +15,8 @@ | |||
// fail with the same error message). | |||
|
|||
#[no_implicit_prelude] | |||
//~^ WARNING: deprecated | |||
//~^^ WARNING: deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come there are two warnings emitted here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature gate visitor is run twice, once before cfg expansion and once after. I could try and find some way to avoid the double up, but the existing simd attribute deprecation warning does the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm ok, we probably want to figure out whether we're deprecating or not before going to great lengths to figure this out, and it's probably fine either way.
Thanks @Nemo157! In terms of tests, can you also add a new test to ensure that In terms of deprecation, we have a few possible routes we can take here:
To me the answer of what to do here kinda depends on if there's any widespread usage of Doing a quick grep over the latest code on crates.io right now I see:
So given that we probably can't remove immediately. We may also not be able to deprecate either without stabilizing I'm personally always a fan of more aggressive deprecation, so I'd prefer to deprecate immediately, but others may feel differently! cc @rust-lang/lang |
☔ The latest upstream changes (presumably #30884) made this pull request unmergeable. Please resolve the merge conflicts. |
4acf7a2
to
e0c361e
Compare
☔ The latest upstream changes (presumably #31954) made this pull request unmergeable. Please resolve the merge conflicts. |
e0c361e
to
938b9e0
Compare
See also #32131 (comment) |
Nominating for discussion at a lang team meeting (I think I applied the right tags?) |
☔ The latest upstream changes (presumably #30652) made this pull request unmergeable. Please resolve the merge conflicts. |
938b9e0
to
d52fc6a
Compare
We discussed how to proceed in the @rust-lang/lang meeting. Our feeling was that:
|
☔ The latest upstream changes (presumably #32875) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing due to inactivity, but feel free to resubmit with a rebase! |
Implementation of rust-lang/rfcs#501 tracked in #20561.
Adds the
no_prelude
attribute that stops automatic injecting of the standard prelude in a single module behind a feature gate.Deprecates the existing
no_implicit_prelude
.