diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:32:50 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:42:46 +0530 |
| commit | e5659eaa0606162c1f08ba2d8a9e86e20c3a3d1c (patch) | |
| tree | d4e0120be267d07b0412a1829dde4c7eb4ac45f7 /src/libstd | |
| parent | a5bdb087d06c432a9b49b9bc442323aca7418b60 (diff) | |
| parent | 1e01f7f470f1d79be710d546ab25426fcede59f9 (diff) | |
| download | rust-e5659eaa0606162c1f08ba2d8a9e86e20c3a3d1c.tar.gz rust-e5659eaa0606162c1f08ba2d8a9e86e20c3a3d1c.zip | |
Rollup merge of #22347 - iKevinY:std-lib-panicking, r=brson
Rename `libstd/failure.rs` to `libstd/panicking.rs` and `on_fail` to `on_panic`. Closes #22306.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/old_io/stdio.rs | 2 | ||||
| -rw-r--r-- | src/libstd/panicking.rs (renamed from src/libstd/failure.rs) | 2 | ||||
| -rw-r--r-- | src/libstd/rt/unwind.rs | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index e6ca1bfdb81..139693ccdbc 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -279,7 +279,7 @@ pub mod sync; #[path = "sys/common/mod.rs"] mod sys_common; pub mod rt; -mod failure; +mod panicking; // Documentation for primitive types diff --git a/src/libstd/old_io/stdio.rs b/src/libstd/old_io/stdio.rs index 8e55251d285..70cce1f7e76 100644 --- a/src/libstd/old_io/stdio.rs +++ b/src/libstd/old_io/stdio.rs @@ -30,7 +30,7 @@ use self::StdSource::*; use boxed::Box; use cell::RefCell; use clone::Clone; -use failure::LOCAL_STDERR; +use panicking::LOCAL_STDERR; use fmt; use old_io::{Reader, Writer, IoResult, IoError, OtherIoError, Buffer, standard_error, EndOfFile, LineBufferedWriter, BufferedReader}; diff --git a/src/libstd/failure.rs b/src/libstd/panicking.rs index c184d3f4661..e485c6a63c6 100644 --- a/src/libstd/failure.rs +++ b/src/libstd/panicking.rs @@ -33,7 +33,7 @@ impl Writer for Stdio { } } -pub fn on_fail(obj: &(Any+Send), file: &'static str, line: uint) { +pub fn on_panic(obj: &(Any+Send), file: &'static str, line: uint) { let msg = match obj.downcast_ref::<&'static str>() { Some(s) => *s, None => match obj.downcast_ref::<String>() { diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index 659e787a9ff..464adadde62 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -62,7 +62,7 @@ use prelude::v1::*; use any::Any; use cell::Cell; use cmp; -use failure; +use panicking; use fmt; use intrinsics; use libc::c_void; @@ -534,10 +534,10 @@ pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, uint)) -> /// }` from ~1900/3700 (-O/no opts) to 180/590. #[inline(never)] #[cold] // this is the slow path, please never inline this fn begin_unwind_inner(msg: Box<Any + Send>, file_line: &(&'static str, uint)) -> ! { - // Make sure the default failure handler is registered before we look at the + // Make sure the default panic handler is registered before we look at the // callbacks. static INIT: Once = ONCE_INIT; - INIT.call_once(|| unsafe { register(failure::on_fail); }); + INIT.call_once(|| unsafe { register(panicking::on_panic); }); // First, invoke call the user-defined callbacks triggered on thread panic. // |
