From 3752958e4029e9d9cfb1ff020e92142b53fb810f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 26 Mar 2015 13:30:33 -0700 Subject: syntax: Remove support for #[should_fail] This attribute has been deprecated in favor of #[should_panic]. This also updates rustdoc to no longer accept the `should_fail` directive and instead renames it to `should_panic`. --- src/libstd/io/buffered.rs | 2 +- src/libstd/macros.rs | 2 +- src/libstd/old_io/fs.rs | 2 +- src/libstd/old_io/process.rs | 2 +- src/libstd/process.rs | 2 +- src/libstd/thread/mod.rs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 2a1294f23b2..23cbe79145a 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -681,7 +681,7 @@ mod tests { } #[test] - #[should_fail] + #[should_panic] fn dont_panic_in_drop_on_panicked_flush() { struct FailFlushWriter; diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 1681ed4282f..52492a019a2 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -28,7 +28,7 @@ /// /// # Examples /// -/// ```should_fail +/// ```should_panic /// # #![allow(unreachable_code)] /// panic!(); /// panic!("this is a terrible mistake!"); diff --git a/src/libstd/old_io/fs.rs b/src/libstd/old_io/fs.rs index 40a7cce81dd..c2a0477b4d1 100644 --- a/src/libstd/old_io/fs.rs +++ b/src/libstd/old_io/fs.rs @@ -105,7 +105,7 @@ impl File { /// /// # Examples /// - /// ```rust,should_fail + /// ```rust,should_panic /// # #![feature(old_io, old_path)] /// use std::old_io::*; /// use std::old_path::Path; diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs index d7ede451fb8..40be2a8b9d9 100644 --- a/src/libstd/old_io/process.rs +++ b/src/libstd/old_io/process.rs @@ -60,7 +60,7 @@ use thread; /// /// # Examples /// -/// ```should_fail +/// ```should_panic /// # #![feature(old_io)] /// use std::old_io::*; /// diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 6a36ecefcf4..b4bd513e8f0 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -37,7 +37,7 @@ use thread; /// /// # Examples /// -/// ```should_fail +/// ```should_panic /// # #![feature(process)] /// /// use std::process::Command; diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 27b50fc9aaa..8f08bf76fc4 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -821,13 +821,13 @@ mod test { } #[test] - #[should_fail] + #[should_panic] fn test_scoped_panic() { thread::scoped(|| panic!()).join(); } #[test] - #[should_fail] + #[should_panic] fn test_scoped_implicit_panic() { let _ = thread::scoped(|| panic!()); } -- cgit 1.4.1-3-g733a5