1616//! interface for failure is:
1717//!
1818//! ```ignore
19- //! fn begin_unwind (fmt: &fmt::Arguments, &(&'static str, uint)) -> !;
19+ //! fn fail_impl (fmt: &fmt::Arguments, &(&'static str, uint)) -> !;
2020//! ```
2121//!
2222//! This definition allows for failing with any general message, but it does not
@@ -39,7 +39,7 @@ fn fail_(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
3939 let ( expr, file, line) = * expr_file_line;
4040 let ref file_line = ( file, line) ;
4141 format_args ! ( |args| -> ( ) {
42- begin_unwind ( args, file_line) ;
42+ fail_impl ( args, file_line) ;
4343 } , "{}" , expr) ;
4444
4545 unsafe { intrinsics:: abort ( ) }
@@ -50,33 +50,33 @@ fn fail_(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
5050fn fail_bounds_check ( file_line : & ( & ' static str , uint ) ,
5151 index : uint , len : uint ) -> ! {
5252 format_args ! ( |args| -> ( ) {
53- begin_unwind ( args, file_line) ;
53+ fail_impl ( args, file_line) ;
5454 } , "index out of bounds: the len is {} but the index is {}" , len, index) ;
5555 unsafe { intrinsics:: abort ( ) }
5656}
5757
5858#[ cold] #[ inline( never) ]
59- pub fn begin_unwind_string ( msg : & str , file : & ( & ' static str , uint ) ) -> ! {
60- format_args ! ( |fmt| begin_unwind ( fmt, file) , "{}" , msg)
59+ pub fn fail_impl_string ( msg : & str , file : & ( & ' static str , uint ) ) -> ! {
60+ format_args ! ( |fmt| fail_impl ( fmt, file) , "{}" , msg)
6161}
6262
6363#[ cold] #[ inline( never) ]
64- pub fn begin_unwind ( fmt : & fmt:: Arguments , file_line : & ( & ' static str , uint ) ) -> ! {
64+ pub fn fail_impl ( fmt : & fmt:: Arguments , file_line : & ( & ' static str , uint ) ) -> ! {
6565 #[ allow( ctypes) ]
6666 extern {
6767
6868 #[ cfg( stage0) ]
6969 #[ lang = "begin_unwind" ]
70- fn begin_unwind ( fmt : & fmt:: Arguments , file : & ' static str ,
70+ fn fail_impl ( fmt : & fmt:: Arguments , file : & ' static str ,
7171 line : uint ) -> !;
7272
7373 #[ cfg( not( stage0) ) ]
7474 #[ lang = "fail_fmt" ]
75- fn begin_unwind ( fmt : & fmt:: Arguments , file : & ' static str ,
75+ fn fail_impl ( fmt : & fmt:: Arguments , file : & ' static str ,
7676 line : uint ) -> !;
7777
7878 }
7979 let ( file, line) = * file_line;
80- unsafe { begin_unwind ( fmt, file, line) }
80+ unsafe { fail_impl ( fmt, file, line) }
8181}
8282
0 commit comments