about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-12 13:21:06 -0800
committerbors <bors@rust-lang.org>2016-03-12 13:21:06 -0800
commita2c56de7643c3b989c703758f0fb9f426403bca2 (patch)
tree6d93e86dd597e0b71632332a141269e6729837ff /src/libstd/thread
parent8788ffc670e981a195c771ab3c8530c72eb119d7 (diff)
parentb53764c73bd722ea22142bace6249d5950066253 (diff)
downloadrust-a2c56de7643c3b989c703758f0fb9f426403bca2.tar.gz
rust-a2c56de7643c3b989c703758f0fb9f426403bca2.zip
Auto merge of #32112 - alexcrichton:fix-issues, r=aturon
std: Fix tracking issues and clean deprecated APIs

This PR fixes up a number of discrepancies found with tracking issues (some closed, some needed new ones, etc), and also cleans out all pre-1.8 deprecated APIs. The big beast here was dealing with `std::dynamic_lib`, and via many applications of a large hammer it's now out of the standard library.
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/mod.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 6a923c8c094..2cf6c64eab8 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -339,40 +339,6 @@ pub fn panicking() -> bool {
     unwind::panicking()
 }
 
-/// Invokes a closure, capturing the cause of panic if one occurs.
-///
-/// This function will return `Ok` with the closure's result if the closure
-/// does not panic, and will return `Err(cause)` if the closure panics. The
-/// `cause` returned is the object with which panic was originally invoked.
-///
-/// It is currently undefined behavior to unwind from Rust code into foreign
-/// code, so this function is particularly useful when Rust is called from
-/// another language (normally C). This can run arbitrary Rust code, capturing a
-/// panic and allowing a graceful handling of the error.
-///
-/// It is **not** recommended to use this function for a general try/catch
-/// mechanism. The `Result` type is more appropriate to use for functions that
-/// can fail on a regular basis.
-///
-/// The closure provided is required to adhere to the `'static` bound to ensure
-/// that it cannot reference data in the parent stack frame, mitigating problems
-/// with exception safety. Furthermore, a `Send` bound is also required,
-/// providing the same safety guarantees as `thread::spawn` (ensuring the
-/// closure is properly isolated from the parent).
-#[unstable(feature = "catch_panic", reason = "recent API addition",
-           issue = "27719")]
-#[rustc_deprecated(since = "1.6.0", reason = "renamed to std::panic::recover")]
-pub fn catch_panic<F, R>(f: F) -> Result<R>
-    where F: FnOnce() -> R + Send + 'static
-{
-    let mut result = None;
-    unsafe {
-        let result = &mut result;
-        try!(unwind::try(move || *result = Some(f())))
-    }
-    Ok(result.unwrap())
-}
-
 /// Puts the current thread to sleep for the specified amount of time.
 ///
 /// The thread may sleep longer than the duration specified due to scheduling