@@ -34,49 +34,20 @@ use fmt;
3434
3535#[ cold] #[ inline( never) ] // this is the slow path, always
3636#[ lang="panic" ]
37- #[ cfg( stage0) ]
38- pub fn panic ( expr_file_line : & ( & ' static str , & ' static str , usize ) ) -> ! {
39- let ( expr, file, line) = * expr_file_line;
40- panic_fmt ( format_args ! ( "{}" , expr) , & ( file, line) )
41- }
42- #[ cold] #[ inline( never) ] // this is the slow path, always
43- #[ lang="panic" ]
44- #[ cfg( not( stage0) ) ]
4537pub fn panic ( expr_file_line : & ( & ' static str , & ' static str , u32 ) ) -> ! {
4638 let ( expr, file, line) = * expr_file_line;
4739 panic_fmt ( format_args ! ( "{}" , expr) , & ( file, line) )
4840}
4941
5042#[ cold] #[ inline( never) ]
5143#[ lang="panic_bounds_check" ]
52- #[ cfg( stage0) ]
53- fn panic_bounds_check ( file_line : & ( & ' static str , usize ) ,
54- index : usize , len : usize ) -> ! {
55- panic_fmt ( format_args ! ( "index out of bounds: the len is {} but the index is {}" ,
56- len, index) , file_line)
57- }
58- #[ cold] #[ inline( never) ]
59- #[ lang="panic_bounds_check" ]
60- #[ cfg( not( stage0) ) ]
6144fn panic_bounds_check ( file_line : & ( & ' static str , u32 ) ,
6245 index : usize , len : usize ) -> ! {
6346 panic_fmt ( format_args ! ( "index out of bounds: the len is {} but the index is {}" ,
6447 len, index) , file_line)
6548}
6649
6750#[ cold] #[ inline( never) ]
68- #[ cfg( stage0) ]
69- pub fn panic_fmt ( fmt : fmt:: Arguments , file_line : & ( & ' static str , usize ) ) -> ! {
70- #[ allow( improper_ctypes) ]
71- extern {
72- #[ lang = "panic_fmt" ]
73- fn panic_impl ( fmt : fmt:: Arguments , file : & ' static str , line : uint ) -> !;
74- }
75- let ( file, line) = * file_line;
76- unsafe { panic_impl ( fmt, file, line as uint ) }
77- }
78- #[ cold] #[ inline( never) ]
79- #[ cfg( not( stage0) ) ]
8051pub fn panic_fmt ( fmt : fmt:: Arguments , file_line : & ( & ' static str , u32 ) ) -> ! {
8152 #[ allow( improper_ctypes) ]
8253 extern {
0 commit comments