Skip to content

Commit 58b9bca

Browse files
authored
Rollup merge of rust-lang#94635 - jhpratt:merge-deprecated-attrs, r=davidtwco
Merge `#[deprecated]` and `#[rustc_deprecated]` 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
2 parents 148a5b3 + e6359ec commit 58b9bca

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
#![feature(const_refs_to_cell)]
168168
#![feature(decl_macro)]
169169
#![feature(derive_default_enum)]
170+
#![cfg_attr(not(bootstrap), feature(deprecated_suggestion))]
170171
#![feature(doc_cfg)]
171172
#![feature(doc_notable_trait)]
172173
#![feature(rustdoc_internals)]

std/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
#![feature(doc_cfg)]
264264
#![feature(doc_cfg_hide)]
265265
#![feature(rustdoc_internals)]
266+
#![cfg_attr(not(bootstrap), feature(deprecated_suggestion))]
266267
#![feature(doc_masked)]
267268
#![feature(doc_notable_trait)]
268269
#![feature(dropck_eyepatch)]

0 commit comments

Comments
 (0)