-
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
Merge #[deprecated]
and #[rustc_deprecated]
#94635
Conversation
This keeps `reason` around for the time being. This is necessary to avoid breakage during the bootstrap process. This change, as a whole, brings `#[rustc_deprecated]` more in line with `#[deprecated]`.
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
#[deprecated]
and #[rustc_depreacted]
#[deprecated]
and #[rustc_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.
Seems reasonable to me.
Awesome. I see this is nominated, so I'll wait for the outcome of that before creating a tracking issue. |
@oli-obk I presume the nomination here is for the unstable deprecated_suggestion feature? It'd be great to leave a comment in the future to avoid making folks guess in meetings :) |
👍 from libs. |
Awesome. Just doing a bit of digging then I'll create a tracking issue and update this PR with it. |
13fcd1a
to
38478ea
Compare
PR should be good to go. Tracking issue was created and included in the relevant commit. |
@bors r+ |
📌 Commit 38478ea has been approved by |
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#92150 (Improve suggestion when casting usize to (possibly) wide pointer) - rust-lang#94635 (Merge `#[deprecated]` and `#[rustc_deprecated]`) - rust-lang#94657 (Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`) - rust-lang#94746 (diagnostics: use rustc_on_unimplemented to recommend `[].iter()`) - rust-lang#94788 (Account for suggestions for complete removal of lines) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fix diagnostics for `#![feature(deprecated_suggestion)]` Follow up from rust-lang#94635, where I missed a couple things.
Fix diagnostics for `#![feature(deprecated_suggestion)]` Follow up from rust-lang#94635, where I missed a couple things.
Fix diagnostics for `#![feature(deprecated_suggestion)]` Follow up from rust-lang#94635, where I missed a couple things.
The first commit makes "reason" an alias for "note" in
#[rustc_deprecated]
, while still prohibiting it in#[deprecated]
.The second commit changes "suggestion" to not just be a feature of
#[rustc_deprecated]
. This is placed behind the newdeprecated_suggestion
feature. This needs a tracking issue; let me know if this PR will be approved and I can create one.The third commit is what permits
#[deprecated]
to be used when#![feature(staged_api)]
is enabled. This isn't yet used in stdlib (only tests), as it would require duplicating all deprecation attributes until a bootstrap occurs. I intend to submit a follow-up PR that replaces all uses and removes the remaining#[rustc_deprecated]
code after the next bootstrap.@rustbot label +T-libs-api +C-feature-request +A-attributes +S-waiting-on-review