From a43e7d5cb9b5725dd32376eeea41b4d23ab93160 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 25 Jul 2014 15:54:10 -0700 Subject: [PATCH] core: Remove unneeded cfgs --- src/libcore/failure.rs | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/src/libcore/failure.rs b/src/libcore/failure.rs index 022258911f1..5965603770b 100644 --- a/src/libcore/failure.rs +++ b/src/libcore/failure.rs @@ -33,7 +33,6 @@ use fmt; use intrinsics; -#[cfg(stage0)] #[cold] #[inline(never)] // this is the slow path, always #[lang="fail_"] fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! { @@ -44,7 +43,6 @@ fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! { unsafe { intrinsics::abort() } } -#[cfg(stage0)] #[cold] #[lang="fail_bounds_check"] fn fail_bounds_check(file: &'static str, line: uint, @@ -55,7 +53,6 @@ fn fail_bounds_check(file: &'static str, line: uint, unsafe { intrinsics::abort() } } -#[cfg(stage0)] #[cold] pub fn begin_unwind(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! { #[allow(ctypes)] @@ -68,37 +65,3 @@ pub fn begin_unwind(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! unsafe { begin_unwind(fmt, file, line) } } -#[cfg(not(stage0))] -#[cold] #[inline(never)] // this is the slow path, always -#[lang="fail_"] -fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! { - format_args!(|args| -> () { - begin_unwind(args, &(file, line)); - }, "{}", expr); - - unsafe { intrinsics::abort() } -} - -#[cfg(not(stage0))] -#[cold] -#[lang="fail_bounds_check"] -fn fail_bounds_check(file: &'static str, line: uint, - index: uint, len: uint) -> ! { - format_args!(|args| -> () { - begin_unwind(args, &(file, line)); - }, "index out of bounds: the len is {} but the index is {}", len, index); - unsafe { intrinsics::abort() } -} - -#[cfg(not(stage0))] -#[cold] -pub fn begin_unwind(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! { - #[allow(ctypes)] - extern { - #[lang = "begin_unwind"] - fn begin_unwind(fmt: &fmt::Arguments, file_line: &'static str, - line: uint) -> !; - } - let (file, line) = *file_line; - unsafe { begin_unwind(fmt, file, line) } -}