about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-13 05:55:50 +0000
committerbors <bors@rust-lang.org>2015-04-13 05:55:50 +0000
commit49798c597f810fbce14959bdbcdae0b635a5bde9 (patch)
tree8ffc335bd4ce1c13b6d1ed59e3e0080bc43dd02a /src/libcore
parent0cf99c3e06e84d20d68da649c888d63c72f33971 (diff)
parentef25b7d5389a68d50904a8b4f4785287fc7c6ac3 (diff)
downloadrust-49798c597f810fbce14959bdbcdae0b635a5bde9.tar.gz
rust-49798c597f810fbce14959bdbcdae0b635a5bde9.zip
Auto merge of #24323 - rprichard:panic-line-type, r=alexcrichton
There are syntax extensions that call `std::rt::begin_unwind` passing it a `usize`.  I updated the syntax extension to instead pass `u32`, but for bootstrapping reasons, I needed to create a `#[cfg(stage0)]` version of `std::rt::begin_unwind` and therefore also `panic!`.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libcore/panicking.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 1b7311028f5..164d3e49385 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -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.
diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs
index d6e00df1fd7..0b8a52329dc 100644
--- a/src/libcore/panicking.rs
+++ b/src/libcore/panicking.rs
@@ -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) }
 }