diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2014-11-01 19:51:16 +0200 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2014-11-05 12:55:58 +0200 |
| commit | 56dbf3d1223bca9e02a201e43fb48895a1d5cbd1 (patch) | |
| tree | dba9141d0aad42d415126320f7e9d8fdeece6841 /src/libcore/panicking.rs | |
| parent | eca8f11315cb3cd9836e6d8501a07fbb137f5e88 (diff) | |
| download | rust-56dbf3d1223bca9e02a201e43fb48895a1d5cbd1.tar.gz rust-56dbf3d1223bca9e02a201e43fb48895a1d5cbd1.zip | |
Register snapshots.
Diffstat (limited to 'src/libcore/panicking.rs')
| -rw-r--r-- | src/libcore/panicking.rs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs index 39de04c27ce..fd0526db411 100644 --- a/src/libcore/panicking.rs +++ b/src/libcore/panicking.rs @@ -33,49 +33,6 @@ use fmt; use intrinsics; -// NOTE(stage0): remove after a snapshot -#[cfg(stage0)] -#[cold] #[inline(never)] // this is the slow path, always -#[lang="fail"] -pub fn panic(expr_file_line: &(&'static str, &'static str, uint)) -> ! { - let (expr, file, line) = *expr_file_line; - let ref file_line = (file, line); - format_args!(|args| -> () { - panic_fmt(args, file_line); - }, "{}", expr); - - unsafe { intrinsics::abort() } -} - -// NOTE(stage0): remove after a snapshot -#[cfg(stage0)] -#[cold] #[inline(never)] -#[lang="fail_bounds_check"] -fn panic_bounds_check(file_line: &(&'static str, uint), - index: uint, len: uint) -> ! { - format_args!(|args| -> () { - panic_fmt(args, file_line); - }, "index out of bounds: the len is {} but the index is {}", len, index); - unsafe { intrinsics::abort() } -} - -// NOTE(stage0): remove after a snapshot -#[cfg(stage0)] -#[cold] #[inline(never)] -pub fn panic_fmt(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! { - #[allow(improper_ctypes)] - extern { - #[lang = "fail_fmt"] - fn panic_impl(fmt: &fmt::Arguments, file: &'static str, - line: uint) -> !; - - } - let (file, line) = *file_line; - unsafe { panic_impl(fmt, file, line) } -} - -// NOTE(stage0): remove cfg after a snapshot -#[cfg(not(stage0))] #[cold] #[inline(never)] // this is the slow path, always #[lang="panic"] pub fn panic(expr_file_line: &(&'static str, &'static str, uint)) -> ! { @@ -88,8 +45,6 @@ pub fn panic(expr_file_line: &(&'static str, &'static str, uint)) -> ! { unsafe { intrinsics::abort() } } -// NOTE(stage0): remove cfg after a snapshot -#[cfg(not(stage0))] #[cold] #[inline(never)] #[lang="panic_bounds_check"] fn panic_bounds_check(file_line: &(&'static str, uint), @@ -100,8 +55,6 @@ fn panic_bounds_check(file_line: &(&'static str, uint), unsafe { intrinsics::abort() } } -// NOTE(stage0): remove cfg after a snapshot -#[cfg(not(stage0))] #[cold] #[inline(never)] pub fn panic_fmt(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! { #[allow(improper_ctypes)] |
