Change the rt::unwind line argument type from usize to u32.
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
//! provided by the [rlibc crate](https://crates.io/crates/rlibc).
|
||||
//!
|
||||
//! * `rust_begin_unwind` - This function takes three arguments, a
|
||||
//! `fmt::Arguments`, a `&str`, and a `usize`. These three arguments dictate
|
||||
//! `fmt::Arguments`, a `&str`, and a `u32`. These three arguments dictate
|
||||
//! the panic message, the file at which panic was invoked, and the line.
|
||||
//! It is up to consumers of this core library to define this panic
|
||||
//! function; it is only required to never return.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
//! interface for panicking is:
|
||||
//!
|
||||
//! ```ignore
|
||||
//! fn panic_impl(fmt: fmt::Arguments, &(&'static str, usize)) -> !;
|
||||
//! fn panic_impl(fmt: fmt::Arguments, &(&'static str, u32)) -> !;
|
||||
//! ```
|
||||
//!
|
||||
//! This definition allows for panicking with any general message, but it does not
|
||||
@@ -58,8 +58,8 @@ pub fn panic_fmt(fmt: fmt::Arguments, file_line: &(&'static str, u32)) -> ! {
|
||||
#[allow(improper_ctypes)]
|
||||
extern {
|
||||
#[lang = "panic_fmt"]
|
||||
fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: usize) -> !;
|
||||
fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32) -> !;
|
||||
}
|
||||
let (file, line) = *file_line;
|
||||
unsafe { panic_impl(fmt, file, line as usize) }
|
||||
unsafe { panic_impl(fmt, file, line) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user