Skip to content

Commit c8b767d

Browse files
committed
Rename begin_unwind_string to fail_str, refs rust-lang#16114
1 parent 1c7d253 commit c8b767d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/libcore/failure.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn fail_(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
4141
let (expr, file, line) = *expr_file_line;
4242
let ref file_line = (file, line);
4343
format_args!(|args| -> () {
44-
fail_impl(args, file_line);
44+
fail_fmt(args, file_line);
4545
}, "{}", expr);
4646

4747
unsafe { intrinsics::abort() }
@@ -54,7 +54,7 @@ fn fail(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
5454
let (expr, file, line) = *expr_file_line;
5555
let ref file_line = (file, line);
5656
format_args!(|args| -> () {
57-
fail_impl(args, file_line);
57+
fail_fmt(args, file_line);
5858
}, "{}", expr);
5959

6060
unsafe { intrinsics::abort() }
@@ -65,18 +65,18 @@ fn fail(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
6565
fn fail_bounds_check(file_line: &(&'static str, uint),
6666
index: uint, len: uint) -> ! {
6767
format_args!(|args| -> () {
68-
fail_impl(args, file_line);
68+
fail_fmt(args, file_line);
6969
}, "index out of bounds: the len is {} but the index is {}", len, index);
7070
unsafe { intrinsics::abort() }
7171
}
7272

7373
#[cold] #[inline(never)]
74-
pub fn fail_impl_string(msg: &str, file: &(&'static str, uint)) -> ! {
75-
format_args!(|fmt| fail_impl(fmt, file), "{}", msg)
74+
pub fn fail_str(msg: &str, file: &(&'static str, uint)) -> ! {
75+
format_args!(|fmt| fail_fmt(fmt, file), "{}", msg)
7676
}
7777

7878
#[cold] #[inline(never)]
79-
pub fn fail_impl(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
79+
pub fn fail_fmt(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
8080
#[allow(ctypes)]
8181
extern {
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::fail_impl_string($msg, &_FILE_LINE)
21+
::core::failure::fail_str($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::fail_impl(fmt, &_FILE_LINE)
43+
::core::failure::fail_fmt(fmt, &_FILE_LINE)
4444
}
4545
format_args!(_run_fmt, $fmt, $($arg)*)
4646
});

0 commit comments

Comments
 (0)