about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-11-23 20:08:49 +0000
committerbors <bors@rust-lang.org>2015-11-23 20:08:49 +0000
commit040a77f772d7693598499a161f53ed230fb61c52 (patch)
tree71f1f369c9175a3655dff16f98465da8f2bce375 /src/libstd
parent8e9a97529d9fd112f338501e68e33bac1c41d1a4 (diff)
parenta613059e3fcfb751f7664f67a4a6c99faf436483 (diff)
downloadrust-040a77f772d7693598499a161f53ed230fb61c52.tar.gz
rust-040a77f772d7693598499a161f53ed230fb61c52.zip
Auto merge of #29952 - petrochenkov:depr, r=brson
Part of https://github.com/rust-lang/rust/issues/29935

The deprecation lint is still called "deprecated", so people can continue using `#[allow(deprecated)]` and similar things.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/dynamic_lib.rs2
-rw-r--r--src/libstd/ffi/c_str.rs4
-rw-r--r--src/libstd/fs.rs4
-rw-r--r--src/libstd/lib.rs2
-rw-r--r--src/libstd/num/f32.rs2
-rw-r--r--src/libstd/num/f64.rs6
-rw-r--r--src/libstd/sync/condvar.rs5
-rw-r--r--src/libstd/thread/mod.rs4
8 files changed, 16 insertions, 13 deletions
diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs
index 1cb48407f10..62ec23ccb20 100644
--- a/src/libstd/dynamic_lib.rs
+++ b/src/libstd/dynamic_lib.rs
@@ -16,7 +16,7 @@
             reason = "API has not been scrutinized and is highly likely to \
                       either disappear or change",
             issue = "27810")]
-#![deprecated(since = "1.5.0", reason = "replaced with crates.io crates")]
+#![rustc_deprecated(since = "1.5.0", reason = "replaced with crates.io crates")]
 #![allow(missing_docs)]
 #![allow(deprecated)]
 
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index 42fd2321f01..40fb450bea1 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -213,7 +213,7 @@ impl CString {
     /// using the pointer.
     #[unstable(feature = "cstr_memory2", reason = "recently added",
                issue = "27769")]
-    #[deprecated(since = "1.4.0", reason = "renamed to from_raw")]
+    #[rustc_deprecated(since = "1.4.0", reason = "renamed to from_raw")]
     pub unsafe fn from_ptr(ptr: *const c_char) -> CString {
         CString::from_raw(ptr as *mut _)
     }
@@ -240,7 +240,7 @@ impl CString {
     /// Failure to call `from_raw` will lead to a memory leak.
     #[unstable(feature = "cstr_memory2", reason = "recently added",
                issue = "27769")]
-    #[deprecated(since = "1.4.0", reason = "renamed to into_raw")]
+    #[rustc_deprecated(since = "1.4.0", reason = "renamed to into_raw")]
     pub fn into_ptr(self) -> *const c_char {
         self.into_raw() as *const _
     }
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index e00b02f518c..93ee8b47a50 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -922,7 +922,7 @@ pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<(
 /// # Ok(())
 /// # }
 /// ```
-#[deprecated(since = "1.1.0",
+#[rustc_deprecated(since = "1.1.0",
              reason = "replaced with std::os::unix::fs::symlink and \
                        std::os::windows::fs::{symlink_file, symlink_dir}")]
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -1176,7 +1176,7 @@ impl Iterator for WalkDir {
                      change and some methods may be removed.  For stable code, \
                      see the std::fs::metadata function.",
            issue = "27725")]
-#[deprecated(since = "1.5.0", reason = "replaced with inherent methods")]
+#[rustc_deprecated(since = "1.5.0", reason = "replaced with inherent methods")]
 pub trait PathExt {
     /// Gets information on the file, directory, etc at this path.
     ///
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 6d8d6f82f07..9700e95ed0f 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -216,6 +216,8 @@
 #![cfg_attr(stage0, allow(unused_attributes))]
 #![cfg_attr(stage0, allow(improper_ctypes))]
 
+#![cfg_attr(stage0, feature(rustc_attrs))]
+#![cfg_attr(stage0, allow(unused_attributes))]
 #![feature(alloc)]
 #![feature(allow_internal_unstable)]
 #![feature(asm)]
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index ab25fe17c2c..ab15867d365 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -129,7 +129,7 @@ impl f32 {
     /// Parses a float as with a given radix
     #[unstable(feature = "float_from_str_radix", reason = "recently moved API",
                issue = "27736")]
-    #[deprecated(since = "1.4.0",
+    #[rustc_deprecated(since = "1.4.0",
                  reason = "unclear how useful or correct this is")]
     pub fn from_str_radix(s: &str, radix: u32) -> Result<f32, ParseFloatError> {
         num::Float::from_str_radix(s, radix)
diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs
index b392ab0c8da..cad42ee64f1 100644
--- a/src/libstd/num/f64.rs
+++ b/src/libstd/num/f64.rs
@@ -86,7 +86,7 @@ impl f64 {
     /// Parses a float as with a given radix
     #[unstable(feature = "float_from_str_radix", reason = "recently moved API",
                issue = "27736")]
-    #[deprecated(since = "1.4.0",
+    #[rustc_deprecated(since = "1.4.0",
                  reason = "unclear how useful or correct this is")]
     pub fn from_str_radix(s: &str, radix: u32) -> Result<f64, ParseFloatError> {
         num::Float::from_str_radix(s, radix)
@@ -355,7 +355,7 @@ impl f64 {
     pub fn is_sign_positive(self) -> bool { num::Float::is_positive(self) }
 
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[deprecated(since = "1.0.0", reason = "renamed to is_sign_positive")]
+    #[rustc_deprecated(since = "1.0.0", reason = "renamed to is_sign_positive")]
     #[inline]
     pub fn is_positive(self) -> bool { num::Float::is_positive(self) }
 
@@ -380,7 +380,7 @@ impl f64 {
     pub fn is_sign_negative(self) -> bool { num::Float::is_negative(self) }
 
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[deprecated(since = "1.0.0", reason = "renamed to is_sign_negative")]
+    #[rustc_deprecated(since = "1.0.0", reason = "renamed to is_sign_negative")]
     #[inline]
     pub fn is_negative(self) -> bool { num::Float::is_negative(self) }
 
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs
index 389c9c4a066..d817a261f7c 100644
--- a/src/libstd/sync/condvar.rs
+++ b/src/libstd/sync/condvar.rs
@@ -166,7 +166,7 @@ impl Condvar {
     /// Like `wait`, the lock specified will be re-acquired when this function
     /// returns, regardless of whether the timeout elapsed or not.
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[deprecated(since = "1.6.0", reason = "replaced by `std::sync::Condvar::wait_timeout`")]
+    #[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::sync::Condvar::wait_timeout`")]
     #[allow(deprecated)]
     pub fn wait_timeout_ms<'a, T>(&self, guard: MutexGuard<'a, T>, ms: u32)
                                   -> LockResult<(MutexGuard<'a, T>, bool)> {
@@ -290,7 +290,8 @@ impl StaticCondvar {
     #[unstable(feature = "static_condvar",
                reason = "may be merged with Condvar in the future",
                issue = "27717")]
-    #[deprecated(since = "1.6.0", reason = "replaced by `std::sync::StaticCondvar::wait_timeout`")]
+    #[rustc_deprecated(since = "1.6.0",
+                       reason = "replaced by `std::sync::StaticCondvar::wait_timeout`")]
     pub fn wait_timeout_ms<'a, T>(&'static self, guard: MutexGuard<'a, T>, ms: u32)
                                   -> LockResult<(MutexGuard<'a, T>, bool)> {
         match self.wait_timeout(guard, Duration::from_millis(ms as u64)) {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 84ceb9b0a51..eaa32cdb342 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -392,7 +392,7 @@ pub fn catch_panic<F, R>(f: F) -> Result<R>
 /// this function will not return early due to a signal being received or a
 /// spurious wakeup.
 #[stable(feature = "rust1", since = "1.0.0")]
-#[deprecated(since = "1.6.0", reason = "replaced by `std::thread::sleep`")]
+#[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::thread::sleep`")]
 pub fn sleep_ms(ms: u32) {
     sleep(Duration::from_millis(ms as u64))
 }
@@ -459,7 +459,7 @@ pub fn park() {
 ///
 /// See the module doc for more detail.
 #[stable(feature = "rust1", since = "1.0.0")]
-#[deprecated(since = "1.6.0", reason = "replaced by `std::thread::park_timeout`")]
+#[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::thread::park_timeout`")]
 pub fn park_timeout_ms(ms: u32) {
     park_timeout(Duration::from_millis(ms as u64))
 }