Deprecated attributes don't take 'feature' names and are paired with stable/unstable
Conflicts: src/libcore/atomic.rs src/libcore/finally.rs src/test/auxiliary/inherited_stability.rs src/test/auxiliary/lint_stability.rs
This commit is contained in:
parent
cd6d9eab5d
commit
9758c488a9
39 changed files with 437 additions and 169 deletions
|
|
@ -1036,7 +1036,8 @@ pub fn fence(order: Ordering) {
|
|||
}
|
||||
}
|
||||
|
||||
#[deprecated(feature = "core", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "renamed to AtomicIsize")]
|
||||
#[allow(missing_docs)]
|
||||
pub struct AtomicInt {
|
||||
|
|
@ -1045,7 +1046,8 @@ pub struct AtomicInt {
|
|||
|
||||
unsafe impl Sync for AtomicInt {}
|
||||
|
||||
#[deprecated(feature = "core", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "renamed to AtomicUsize")]
|
||||
#[allow(missing_docs)]
|
||||
pub struct AtomicUint {
|
||||
|
|
@ -1054,12 +1056,14 @@ pub struct AtomicUint {
|
|||
|
||||
unsafe impl Sync for AtomicUint {}
|
||||
|
||||
#[deprecated(feature = "core", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use ATOMIC_ISIZE_INIT instead")]
|
||||
#[allow(missing_docs, deprecated)]
|
||||
pub const ATOMIC_INT_INIT: AtomicInt =
|
||||
AtomicInt { v: UnsafeCell { value: 0 } };
|
||||
#[deprecated(feature = "core", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use ATOMIC_USIZE_INIT instead")]
|
||||
#[allow(missing_docs, deprecated)]
|
||||
pub const ATOMIC_UINT_INIT: AtomicUint =
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@
|
|||
//! })
|
||||
//! ```
|
||||
|
||||
#![deprecated(feature = "core", since = "1.0.0",
|
||||
#![unstable(feature = "core")]
|
||||
#![deprecated(since = "1.0.0",
|
||||
reason = "It is unclear if this module is more robust than implementing \
|
||||
Drop on a custom type, and this module is being removed with no \
|
||||
replacement. Use a custom Drop implementation to regain existing \
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ impl SipHasher {
|
|||
}
|
||||
|
||||
/// Returns the computed hash.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0", reason = "renamed to finish")]
|
||||
#[unstable(feature = "hash")]
|
||||
#[deprecated(since = "1.0.0", reason = "renamed to finish")]
|
||||
pub fn result(&self) -> u64 { self.finish() }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,43 +178,53 @@ impl Float for f32 {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn mantissa_digits(_: Option<f32>) -> uint { MANTISSA_DIGITS }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn digits(_: Option<f32>) -> uint { DIGITS }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn epsilon() -> f32 { EPSILON }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_exp(_: Option<f32>) -> int { MIN_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn max_exp(_: Option<f32>) -> int { MAX_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_10_exp(_: Option<f32>) -> int { MIN_10_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn max_10_exp(_: Option<f32>) -> int { MAX_10_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_value() -> f32 { MIN_VALUE }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_pos_value(_: Option<f32>) -> f32 { MIN_POS_VALUE }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn max_value() -> f32 { MAX_VALUE }
|
||||
|
||||
/// Returns the mantissa, exponent and sign as integers.
|
||||
|
|
|
|||
|
|
@ -185,43 +185,53 @@ impl Float for f64 {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn mantissa_digits(_: Option<f64>) -> uint { MANTISSA_DIGITS }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn digits(_: Option<f64>) -> uint { DIGITS }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn epsilon() -> f64 { EPSILON }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_exp(_: Option<f64>) -> int { MIN_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn max_exp(_: Option<f64>) -> int { MAX_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_10_exp(_: Option<f64>) -> int { MIN_10_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn max_10_exp(_: Option<f64>) -> int { MAX_10_EXP }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_value() -> f64 { MIN_VALUE }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn min_pos_value(_: Option<f64>) -> f64 { MIN_POS_VALUE }
|
||||
|
||||
#[inline]
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0")]
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0")]
|
||||
fn max_value() -> f64 { MAX_VALUE }
|
||||
|
||||
/// Returns the mantissa, exponent and sign as integers.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
//! alpha cycle along with the development of clearer conventions
|
||||
//! around integer types.
|
||||
|
||||
#![deprecated(feature = "oldstuff", since = "1.0.0", reason = "replaced by isize")]
|
||||
#![unstable(feature = "core")]
|
||||
#![deprecated(since = "1.0.0", reason = "replaced by isize")]
|
||||
|
||||
#[cfg(target_pointer_width = "32")] int_module! { int, 32 }
|
||||
#[cfg(target_pointer_width = "64")] int_module! { int, 64 }
|
||||
|
|
|
|||
|
|
@ -1292,45 +1292,55 @@ pub trait Float
|
|||
// FIXME (#5527): These should be associated constants
|
||||
|
||||
/// Returns the number of binary digits of mantissa that this type supports.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MANTISSA_DIGITS` or \
|
||||
`std::f64::MANTISSA_DIGITS` as appropriate")]
|
||||
fn mantissa_digits(unused_self: Option<Self>) -> uint;
|
||||
/// Returns the number of base-10 digits of precision that this type supports.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::DIGITS` or `std::f64::DIGITS` as appropriate")]
|
||||
fn digits(unused_self: Option<Self>) -> uint;
|
||||
/// Returns the difference between 1.0 and the smallest representable number larger than 1.0.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::EPSILON` or `std::f64::EPSILON` as appropriate")]
|
||||
fn epsilon() -> Self;
|
||||
/// Returns the minimum binary exponent that this type can represent.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MIN_EXP` or `std::f64::MIN_EXP` as appropriate")]
|
||||
fn min_exp(unused_self: Option<Self>) -> int;
|
||||
/// Returns the maximum binary exponent that this type can represent.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MAX_EXP` or `std::f64::MAX_EXP` as appropriate")]
|
||||
fn max_exp(unused_self: Option<Self>) -> int;
|
||||
/// Returns the minimum base-10 exponent that this type can represent.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MIN_10_EXP` or `std::f64::MIN_10_EXP` as appropriate")]
|
||||
fn min_10_exp(unused_self: Option<Self>) -> int;
|
||||
/// Returns the maximum base-10 exponent that this type can represent.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MAX_10_EXP` or `std::f64::MAX_10_EXP` as appropriate")]
|
||||
fn max_10_exp(unused_self: Option<Self>) -> int;
|
||||
/// Returns the smallest finite value that this type can represent.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MIN_VALUE` or `std::f64::MIN_VALUE` as appropriate")]
|
||||
fn min_value() -> Self;
|
||||
/// Returns the smallest normalized positive number that this type can represent.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MIN_POS_VALUE` or \
|
||||
`std::f64::MIN_POS_VALUE` as appropriate")]
|
||||
fn min_pos_value(unused_self: Option<Self>) -> Self;
|
||||
/// Returns the largest finite value that this type can represent.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use `std::f32::MAX_VALUE` or `std::f64::MAX_VALUE` as appropriate")]
|
||||
fn max_value() -> Self;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
//! alpha cycle along with the development of clearer conventions
|
||||
//! around integer types.
|
||||
|
||||
#![deprecated(feature = "oldstuff", since = "1.0.0", reason = "replaced by usize")]
|
||||
#![unstable(feature = "core")]
|
||||
#![deprecated(since = "1.0.0", reason = "replaced by usize")]
|
||||
|
||||
uint_module! { uint, int, ::int::BITS }
|
||||
|
|
|
|||
|
|
@ -195,7 +195,8 @@ pub unsafe fn from_utf8_unchecked<'a>(v: &'a [u8]) -> &'a str {
|
|||
/// # Panics
|
||||
///
|
||||
/// This function will panic if the string pointed to by `s` is not valid UTF-8.
|
||||
#[deprecated(feature = "oldstuff", since = "1.0.0",
|
||||
#[unstable(feature = "core")]
|
||||
#[deprecated(since = "1.0.0",
|
||||
reason = "use std::ffi::c_str_to_bytes + str::from_utf8")]
|
||||
pub unsafe fn from_c_str(s: *const i8) -> &'static str {
|
||||
let s = s as *const u8;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue