Skip to content

Rename rust_fail to rust_panic #18442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/complement-bugreport.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ release: 0.12.0
```

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

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

Expand Down
6 changes: 3 additions & 3 deletions src/librustrt/unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ pub unsafe fn try(f: ||) -> ::core::result::Result<(), Box<Any + Send>> {
// An uninlined, unmangled function upon which to slap yer breakpoints
#[inline(never)]
#[no_mangle]
fn rust_fail(cause: Box<Any + Send>) -> ! {
fn rust_panic(cause: Box<Any + Send>) -> ! {
rtdebug!("begin_unwind()");

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

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

/// Register a callback to be invoked when a task unwinds.
Expand Down