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

Merge #[deprecated] and #[rustc_deprecated] #94635

Merged
merged 3 commits into from
Mar 10, 2022

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Mar 5, 2022

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 new deprecated_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

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]`.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 5, 2022
@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 5, 2022
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 5, 2022
@rust-log-analyzer

This comment has been minimized.

@joshtriplett joshtriplett changed the title Merge #[deprecated] and #[rustc_depreacted] Merge #[deprecated] and #[rustc_deprecated] Mar 5, 2022
Copy link
Member

@davidtwco davidtwco left a 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.

@oli-obk oli-obk added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Mar 8, 2022
@jhpratt
Copy link
Member Author

jhpratt commented Mar 8, 2022

Awesome. I see this is nominated, so I'll wait for the outcome of that before creating a tracking issue.

@Mark-Simulacrum
Copy link
Member

@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 :)

@m-ou-se m-ou-se removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Mar 9, 2022
@m-ou-se
Copy link
Member

m-ou-se commented Mar 9, 2022

👍 from libs.

@jhpratt
Copy link
Member Author

jhpratt commented Mar 9, 2022

Awesome. Just doing a bit of digging then I'll create a tracking issue and update this PR with it.

@jhpratt
Copy link
Member Author

jhpratt commented Mar 9, 2022

PR should be good to go. Tracking issue was created and included in the relevant commit.

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 10, 2022

📌 Commit 38478ea has been approved by davidtwco

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 10, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2022
…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
@bors bors merged commit 313a668 into rust-lang:master Mar 10, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 10, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 19, 2022
Fix diagnostics for `#![feature(deprecated_suggestion)]`

Follow up from rust-lang#94635, where I missed a couple things.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 19, 2022
Fix diagnostics for `#![feature(deprecated_suggestion)]`

Follow up from rust-lang#94635, where I missed a couple things.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 20, 2022
Fix diagnostics for `#![feature(deprecated_suggestion)]`

Follow up from rust-lang#94635, where I missed a couple things.
@jhpratt jhpratt deleted the merge-deprecated-attrs branch May 3, 2022 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) C-feature-request Category: A feature request, i.e: not implemented / a PR. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants