core: Remove unneeded cfgs
This commit is contained in:
parent
f7ab07c780
commit
a43e7d5cb9
1 changed files with 0 additions and 37 deletions
|
@ -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) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue