Skip to content

Rename std::failure to std::panicking #22347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ pub mod sync;
#[path = "sys/common/mod.rs"] mod sys_common;

pub mod rt;
mod failure;
mod panicking;

// Documentation for primitive types

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/old_io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/failure.rs → src/libstd/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>() {
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/rt/unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
//
Expand Down