about summary refs log tree commit diff
path: root/src/libstd/panic.rs
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2016-02-17 11:29:18 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2016-02-17 11:29:18 +0000
commitb6a65df6d5d458de0eb96641e4f3cc3497172844 (patch)
tree9065d308ec5a228a7ff129defd1ae8b09dd8ae2a /src/libstd/panic.rs
parent0d1cd9bd6ac65e2a3fa8a1519fd368de79d5bfb5 (diff)
downloadrust-b6a65df6d5d458de0eb96641e4f3cc3497172844.tar.gz
rust-b6a65df6d5d458de0eb96641e4f3cc3497172844.zip
Add into_inner to AssertRecoverSafe
Diffstat (limited to 'src/libstd/panic.rs')
-rw-r--r--src/libstd/panic.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs
index 83df54f1830..69a1b57a0c5 100644
--- a/src/libstd/panic.rs
+++ b/src/libstd/panic.rs
@@ -193,6 +193,12 @@ impl<T> AssertRecoverSafe<T> {
     pub fn new(t: T) -> AssertRecoverSafe<T> {
         AssertRecoverSafe(t)
     }
+
+    /// Consumes the `AssertRecoverSafe`, returning the wrapped value.
+    #[unstable(feature = "recover", reason = "awaiting feedback", issue = "27719")]
+    pub fn into_inner(self) -> T {
+        self.0
+    }
 }
 
 impl<T> Deref for AssertRecoverSafe<T> {