Skip to content

Commit a43e7d5

Browse files
committed
core: Remove unneeded cfgs
1 parent f7ab07c commit a43e7d5

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

src/libcore/failure.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
use fmt;
3434
use intrinsics;
3535

36-
#[cfg(stage0)]
3736
#[cold] #[inline(never)] // this is the slow path, always
3837
#[lang="fail_"]
3938
fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! {
@@ -44,7 +43,6 @@ fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! {
4443
unsafe { intrinsics::abort() }
4544
}
4645

47-
#[cfg(stage0)]
4846
#[cold]
4947
#[lang="fail_bounds_check"]
5048
fn fail_bounds_check(file: &'static str, line: uint,
@@ -55,7 +53,6 @@ fn fail_bounds_check(file: &'static str, line: uint,
5553
unsafe { intrinsics::abort() }
5654
}
5755

58-
#[cfg(stage0)]
5956
#[cold]
6057
pub fn begin_unwind(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
6158
#[allow(ctypes)]
@@ -68,37 +65,3 @@ pub fn begin_unwind(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> !
6865
unsafe { begin_unwind(fmt, file, line) }
6966
}
7067

71-
#[cfg(not(stage0))]
72-
#[cold] #[inline(never)] // this is the slow path, always
73-
#[lang="fail_"]
74-
fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! {
75-
format_args!(|args| -> () {
76-
begin_unwind(args, &(file, line));
77-
}, "{}", expr);
78-
79-
unsafe { intrinsics::abort() }
80-
}
81-
82-
#[cfg(not(stage0))]
83-
#[cold]
84-
#[lang="fail_bounds_check"]
85-
fn fail_bounds_check(file: &'static str, line: uint,
86-
index: uint, len: uint) -> ! {
87-
format_args!(|args| -> () {
88-
begin_unwind(args, &(file, line));
89-
}, "index out of bounds: the len is {} but the index is {}", len, index);
90-
unsafe { intrinsics::abort() }
91-
}
92-
93-
#[cfg(not(stage0))]
94-
#[cold]
95-
pub fn begin_unwind(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
96-
#[allow(ctypes)]
97-
extern {
98-
#[lang = "begin_unwind"]
99-
fn begin_unwind(fmt: &fmt::Arguments, file_line: &'static str,
100-
line: uint) -> !;
101-
}
102-
let (file, line) = *file_line;
103-
unsafe { begin_unwind(fmt, file, line) }
104-
}

0 commit comments

Comments
 (0)