about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2014-07-25 15:54:10 -0700
committerBrian Anderson <banderson@mozilla.com>2014-07-25 15:54:10 -0700
commita43e7d5cb9b5725dd32376eeea41b4d23ab93160 (patch)
treeb00b1ce06c8c9e4bdc3c359b41ad3e6ed8ce8a53 /src
parentf7ab07c7806bb4a7418f228c1cf266cdf011a878 (diff)
downloadrust-a43e7d5cb9b5725dd32376eeea41b4d23ab93160.tar.gz
rust-a43e7d5cb9b5725dd32376eeea41b4d23ab93160.zip
core: Remove unneeded cfgs
Diffstat (limited to 'src')
-rw-r--r--src/libcore/failure.rs37
1 files changed, 0 insertions, 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) }
-}