about summary refs log tree commit diff
path: root/src/libcore/panicking.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-29 19:40:57 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-30 15:04:43 -0800
commit262c1efe6352a3e4dba4d8aebc4d9bd96849cd71 (patch)
tree4096f26993c2db2e0c95181170ef63f46cf3cb7e /src/libcore/panicking.rs
parent023dfb0c898d851dee6ace2f8339b73b5287136b (diff)
downloadrust-262c1efe6352a3e4dba4d8aebc4d9bd96849cd71.tar.gz
rust-262c1efe6352a3e4dba4d8aebc4d9bd96849cd71.zip
Register new snapshots
Diffstat (limited to 'src/libcore/panicking.rs')
-rw-r--r--src/libcore/panicking.rs49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs
index 32f09a4c17f..61b4284e1dd 100644
--- a/src/libcore/panicking.rs
+++ b/src/libcore/panicking.rs
@@ -31,11 +31,7 @@
 #![allow(dead_code, missing_docs)]
 
 use fmt;
-// NOTE(stage0): Remove import after a snapshot
-#[cfg(stage0)] use intrinsics;
 
-// 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)) -> ! {
@@ -43,22 +39,6 @@ pub fn panic(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
     panic_fmt(format_args!("{}", expr), &(file, line))
 }
 
-// NOTE(stage0): Remove function after a snapshot
-#[cfg(stage0)]
-#[cold] #[inline(never)] // this is the slow path, always
-#[lang="panic"]
-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 cfg after a snapshot
-#[cfg(not(stage0))]
 #[cold] #[inline(never)]
 #[lang="panic_bounds_check"]
 fn panic_bounds_check(file_line: &(&'static str, uint),
@@ -67,20 +47,6 @@ fn panic_bounds_check(file_line: &(&'static str, uint),
                            len, index), file_line)
 }
 
-// NOTE(stage0): Remove function after a snapshot
-#[cfg(stage0)]
-#[cold] #[inline(never)]
-#[lang="panic_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 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)]
@@ -91,18 +57,3 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
     let (file, line) = *file_line;
     unsafe { panic_impl(fmt, file, line) }
 }
-
-// NOTE(stage0): Remove function 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 = "panic_fmt"]
-        fn panic_impl(fmt: &fmt::Arguments, file: &'static str,
-                        line: uint) -> !;
-
-    }
-    let (file, line) = *file_line;
-    unsafe { panic_impl(fmt, file, line) }
-}