Skip to content

Commit 13d19bb

Browse files
committed
Rename rust_fail to rust_panic
1 parent 77f44d4 commit 13d19bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/doc/complement-bugreport.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ release: 0.12.0
4747
```
4848

4949
Finally, if you can run the offending command under gdb, pasting a stack trace can be
50-
useful; to do so, you will need to set a breakpoint on `rust_fail`.
50+
useful; to do so, you will need to set a breakpoint on `rust_panic`.
5151

5252
# I submitted a bug, but nobody has commented on it!
5353

src/librustrt/unwind.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ pub unsafe fn try(f: ||) -> ::core::result::Result<(), Box<Any + Send>> {
177177
// An uninlined, unmangled function upon which to slap yer breakpoints
178178
#[inline(never)]
179179
#[no_mangle]
180-
fn rust_fail(cause: Box<Any + Send>) -> ! {
180+
fn rust_panic(cause: Box<Any + Send>) -> ! {
181181
rtdebug!("begin_unwind()");
182182

183183
unsafe {
@@ -588,7 +588,7 @@ fn begin_unwind_inner(msg: Box<Any + Send>, file_line: &(&'static str, uint)) ->
588588
// (hopefully someone printed something about this).
589589
let mut task: Box<Task> = match Local::try_take() {
590590
Some(task) => task,
591-
None => rust_fail(msg),
591+
None => rust_panic(msg),
592592
};
593593

594594
if task.unwinder.unwinding {
@@ -605,7 +605,7 @@ fn begin_unwind_inner(msg: Box<Any + Send>, file_line: &(&'static str, uint)) ->
605605
// requires the task. We need a handle to its unwinder, however, so after
606606
// this we unsafely extract it and continue along.
607607
Local::put(task);
608-
rust_fail(msg);
608+
rust_panic(msg);
609609
}
610610

611611
/// Register a callback to be invoked when a task unwinds.

0 commit comments

Comments
 (0)