Merge #[deprecated] and #[rustc_deprecated]#94635
Merged
bors merged 3 commits intorust-lang:masterfrom Mar 10, 2022
Merged
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]`.
Contributor
|
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]
Member
Author
|
Awesome. I see this is nominated, so I'll wait for the outcome of that before creating a tracking issue. |
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 :) |
Member
|
👍 from libs. |
Member
Author
|
Awesome. Just doing a bit of digging then I'll create a tracking issue and update this PR with it. |
3 tasks
13fcd1a to
38478ea
Compare
Member
Author
|
PR should be good to go. Tracking issue was created and included in the relevant commit. |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 38478ea has been approved by |
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_suggestionfeature. 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