Skip to content

Commit 45f4081

Browse files
committed
Rename core::failure::begin_unwind to fail_impl, refs rust-lang#16114
1 parent 9a01da9 commit 45f4081

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/libcore/failure.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! interface for failure is:
1717
//!
1818
//! ```ignore
19-
//! fn begin_unwind(fmt: &fmt::Arguments, &(&'static str, uint)) -> !;
19+
//! fn fail_impl(fmt: &fmt::Arguments, &(&'static str, uint)) -> !;
2020
//! ```
2121
//!
2222
//! This definition allows for failing with any general message, but it does not
@@ -39,7 +39,7 @@ fn fail_(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
3939
let (expr, file, line) = *expr_file_line;
4040
let ref file_line = (file, line);
4141
format_args!(|args| -> () {
42-
begin_unwind(args, file_line);
42+
fail_impl(args, file_line);
4343
}, "{}", expr);
4444

4545
unsafe { intrinsics::abort() }
@@ -50,33 +50,33 @@ fn fail_(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
5050
fn fail_bounds_check(file_line: &(&'static str, uint),
5151
index: uint, len: uint) -> ! {
5252
format_args!(|args| -> () {
53-
begin_unwind(args, file_line);
53+
fail_impl(args, file_line);
5454
}, "index out of bounds: the len is {} but the index is {}", len, index);
5555
unsafe { intrinsics::abort() }
5656
}
5757

5858
#[cold] #[inline(never)]
59-
pub fn begin_unwind_string(msg: &str, file: &(&'static str, uint)) -> ! {
60-
format_args!(|fmt| begin_unwind(fmt, file), "{}", msg)
59+
pub fn fail_impl_string(msg: &str, file: &(&'static str, uint)) -> ! {
60+
format_args!(|fmt| fail_impl(fmt, file), "{}", msg)
6161
}
6262

6363
#[cold] #[inline(never)]
64-
pub fn begin_unwind(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
64+
pub fn fail_impl(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
6565
#[allow(ctypes)]
6666
extern {
6767

6868
#[cfg(stage0)]
6969
#[lang = "begin_unwind"]
70-
fn begin_unwind(fmt: &fmt::Arguments, file: &'static str,
70+
fn fail_impl(fmt: &fmt::Arguments, file: &'static str,
7171
line: uint) -> !;
7272

7373
#[cfg(not(stage0))]
7474
#[lang = "fail_fmt"]
75-
fn begin_unwind(fmt: &fmt::Arguments, file: &'static str,
75+
fn fail_impl(fmt: &fmt::Arguments, file: &'static str,
7676
line: uint) -> !;
7777

7878
}
7979
let (file, line) = *file_line;
80-
unsafe { begin_unwind(fmt, file, line) }
80+
unsafe { fail_impl(fmt, file, line) }
8181
}
8282

src/libcore/macros.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ macro_rules! fail(
1818
);
1919
($msg:expr) => ({
2020
static _FILE_LINE: (&'static str, uint) = (file!(), line!());
21-
::core::failure::begin_unwind_string($msg, &_FILE_LINE)
21+
::core::failure::fail_impl_string($msg, &_FILE_LINE)
2222
});
2323
($fmt:expr, $($arg:tt)*) => ({
2424
// a closure can't have return type !, so we need a full
@@ -40,7 +40,7 @@ macro_rules! fail(
4040
#[inline(always)]
4141
fn _run_fmt(fmt: &::std::fmt::Arguments) -> ! {
4242
static _FILE_LINE: (&'static str, uint) = (file!(), line!());
43-
::core::failure::begin_unwind(fmt, &_FILE_LINE)
43+
::core::failure::fail_impl(fmt, &_FILE_LINE)
4444
}
4545
format_args!(_run_fmt, $fmt, $($arg)*)
4646
});

0 commit comments

Comments
 (0)