diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-04-09 15:54:28 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-04-10 00:24:43 +0530 |
| commit | 5daee19eca622030c598042d9615df17d4ad035f (patch) | |
| tree | e69748a12da9881b913c4ef90bf65ff23a8efd00 /src/libstd | |
| parent | 4e466e730b18645e73c2e4a841f6e675c82ceb22 (diff) | |
| parent | ec7c800d2fc0dc5918d325ae68d88c9708d20259 (diff) | |
| download | rust-5daee19eca622030c598042d9615df17d4ad035f.tar.gz rust-5daee19eca622030c598042d9615df17d4ad035f.zip | |
Rollup merge of #24212 - alexcrichton:destabilize-begin-unwind, r=huonw
Now that we have a `#[allow_internal_unstable]` attribute for macros there's no need for these two `begin_unwind` functions to be stable. Right now the `panic!` interface is the only one we wish to stabilize, so remove the stability markers from these functions. While this is a breaking change, it is highly unlikely to break any actual code. It is recommended to use the `panic!` macro instead if it breaks explicit calls into `std::rt`. [breaking-change] cc #24208
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 1 | ||||
| -rw-r--r-- | src/libstd/rt/unwind.rs | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index b3d1adb4421..3d10c151f80 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -37,6 +37,7 @@ /// ``` #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] +#[allow_internal_unstable] macro_rules! panic { () => ({ panic!("explicit panic") diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index f71811b1ead..2f58a437eb4 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -495,7 +495,6 @@ pub extern fn rust_begin_unwind(msg: fmt::Arguments, /// on (e.g.) the inlining of other functions as possible), by moving /// the actual formatting into this shared place. #[inline(never)] #[cold] -#[stable(since = "1.0.0", feature = "rust1")] pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, usize)) -> ! { use fmt::Write; @@ -511,7 +510,6 @@ pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, usize)) /// This is the entry point of unwinding for panic!() and assert!(). #[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible -#[stable(since = "1.0.0", feature = "rust1")] pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, usize)) -> ! { // Note that this should be the only allocation performed in this code path. // Currently this means that panic!() on OOM will invoke this code path, @@ -598,7 +596,6 @@ fn begin_unwind_inner(msg: Box<Any + Send>, /// Only a limited number of callbacks can be registered, and this function /// returns whether the callback was successfully registered or not. It is not /// currently possible to unregister a callback once it has been registered. -#[unstable(feature = "std_misc")] pub unsafe fn register(f: Callback) -> bool { match CALLBACK_CNT.fetch_add(1, Ordering::SeqCst) { // The invocation code has knowledge of this window where the count has |
