Skip to content

Commit a613059

Browse files
committed
Rename #[deprecated] to #[rustc_deprecated]
1 parent 2228bac commit a613059

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+126
-113
lines changed

src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2327,7 +2327,7 @@ The currently implemented features of the reference compiler are:
23272327

23282328
* `staged_api` - Allows usage of stability markers and `#![staged_api]` in a
23292329
crate. Stability markers are also attributes: `#[stable]`,
2330-
`#[unstable]`, and `#[deprecated]` are the three levels.
2330+
`#[unstable]`, and `#[rustc_deprecated]` are the three levels.
23312331

23322332
* `start` - Allows use of the `#[start]` attribute, which changes the entry point
23332333
into a Rust program. This capability, especially the signature for the

src/etc/featureck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
lang_stable_since = language_feature_stats[name][4]
207207
lib_stable_since = lib_feature_stats[name][4]
208208

209-
if lang_status != lib_status and lib_status != "deprecated":
209+
if lang_status != lib_status and lib_status != "rustc_deprecated":
210210
print("error: feature '%s' has lang status %s " +
211211
"but lib status %s" % (name, lang_status, lib_status))
212212
errors = True

src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl<T: ?Sized> Deref for Arc<T> {
385385
impl<T: Clone> Arc<T> {
386386
#[unstable(feature = "arc_make_unique", reason = "renamed to Arc::make_mut",
387387
issue = "27718")]
388-
#[deprecated(since = "1.4.0", reason = "renamed to Arc::make_mut")]
388+
#[rustc_deprecated(since = "1.4.0", reason = "renamed to Arc::make_mut")]
389389
pub fn make_unique(this: &mut Self) -> &mut T {
390390
Arc::make_mut(this)
391391
}

src/liballoc/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
#![no_std]
7575
#![cfg_attr(not(stage0), needs_allocator)]
7676

77+
#![cfg_attr(stage0, feature(rustc_attrs))]
78+
#![cfg_attr(stage0, allow(unused_attributes))]
7779
#![feature(allocator)]
7880
#![feature(box_syntax)]
7981
#![feature(coerce_unsized)]

src/liballoc/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ impl<T: Clone> Rc<T> {
362362
#[inline]
363363
#[unstable(feature = "rc_make_unique", reason = "renamed to Rc::make_mut",
364364
issue = "27718")]
365-
#[deprecated(since = "1.4.0", reason = "renamed to Rc::make_mut")]
365+
#[rustc_deprecated(since = "1.4.0", reason = "renamed to Rc::make_mut")]
366366
pub fn make_unique(&mut self) -> &mut T {
367367
Rc::make_mut(self)
368368
}

src/libcollections/binary_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ impl<T: Ord> BinaryHeap<T> {
241241
#[unstable(feature = "binary_heap_extras",
242242
reason = "needs to be audited",
243243
issue = "28147")]
244-
#[deprecated(since = "1.5.0", reason = "use BinaryHeap::from instead")]
244+
#[rustc_deprecated(since = "1.5.0", reason = "use BinaryHeap::from instead")]
245245
pub fn from_vec(vec: Vec<T>) -> BinaryHeap<T> {
246246
BinaryHeap::from(vec)
247247
}

src/libcollections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
161161
#[unstable(feature = "btree_b",
162162
reason = "probably want this to be on the type, eventually",
163163
issue = "27795")]
164-
#[deprecated(since = "1.4.0", reason = "niche API")]
164+
#[rustc_deprecated(since = "1.4.0", reason = "niche API")]
165165
pub fn with_b(b: usize) -> BTreeMap<K, V> {
166166
assert!(b > 1, "B must be greater than 1");
167167
BTreeMap {

src/libcollections/btree/set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<T: Ord> BTreeSet<T> {
105105
#[unstable(feature = "btree_b",
106106
reason = "probably want this to be on the type, eventually",
107107
issue = "27795")]
108-
#[deprecated(since = "1.4.0", reason = "niche API")]
108+
#[rustc_deprecated(since = "1.4.0", reason = "niche API")]
109109
#[allow(deprecated)]
110110
pub fn with_b(b: usize) -> BTreeSet<T> {
111111
BTreeSet { map: BTreeMap::with_b(b) }

src/libcollections/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
// SNAP 1af31d4
3838
#![allow(unused_attributes)]
3939

40+
#![cfg_attr(stage0, feature(rustc_attrs))]
41+
#![cfg_attr(stage0, allow(unused_attributes))]
4042
#![feature(alloc)]
4143
#![feature(box_patterns)]
4244
#![feature(box_syntax)]

src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ pub trait SliceConcatExt<T: ?Sized> {
862862
/// assert_eq!(["hello", "world"].connect(" "), "hello world");
863863
/// ```
864864
#[stable(feature = "rust1", since = "1.0.0")]
865-
#[deprecated(since = "1.3.0", reason = "renamed to join")]
865+
#[rustc_deprecated(since = "1.3.0", reason = "renamed to join")]
866866
fn connect(&self, sep: &T) -> Self::Output;
867867
}
868868

0 commit comments

Comments
 (0)