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
This commit is contained in:
Manish Goregaokar 2015-04-09 15:54:28 +05:30
commit 5daee19eca
794 changed files with 1 additions and 795 deletions

View File

@ -37,6 +37,7 @@
/// ```
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable]
macro_rules! panic {
() => ({
panic!("explicit panic")

View File

@ -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

View File

@ -12,7 +12,6 @@
// because it needs TempDir, which is in extra
// ignore-android
// pretty-expanded FIXME #23616
#![feature(rustc_private, path_ext)]

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
struct X {
x: isize

View File

@ -10,7 +10,6 @@
// pretty-expanded FIXME #23616
pub fn main() {
let i32_c: isize = 0x10101010;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(type_limits)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn f() -> isize { { return 3; } }

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn main() {
assert_eq!(3 as usize * 3, 9);

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![feature(asm)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![feature(asm)]

View File

@ -9,7 +9,6 @@
// except according to those terms.
// Issue 483 - Assignment expressions result in nil
// pretty-expanded FIXME #23616
fn test_assign() {
let mut x: isize;

View File

@ -12,7 +12,6 @@
// making method calls, but only if there aren't any matches without
// it.
// pretty-expanded FIXME #23616
#![feature(unboxed_closures)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![feature(core)]

View File

@ -11,7 +11,6 @@
// Test a case where the associated type binding (to `bool`, in this
// case) is derived from the trait definition. Issue #21636.
// pretty-expanded FIXME #23616
use std::vec;

View File

@ -10,7 +10,6 @@
// Test equality constrai32s on associated types in a where clause.
// pretty-expanded FIXME #23616
pub trait ToI32 {
fn to_i32(&self) -> i32;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
trait SignedUnsigned {
type Opposite;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -10,7 +10,6 @@
// Test associated types appearing in struct-like enum variants.
// pretty-expanded FIXME #23616
use self::VarValue::*;

View File

@ -10,7 +10,6 @@
// Test associated types appearing in tuple-like enum variants.
// pretty-expanded FIXME #23616
use self::VarValue::*;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
trait Get {
type Value;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
trait Get {
type Value;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
trait Get {
type Value;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
trait Get {
type Value;

View File

@ -10,7 +10,6 @@
// Test references to `Self::Item` in the trait. Issue #20220.
// pretty-expanded FIXME #23616
use std::vec;

View File

@ -13,7 +13,6 @@
// where clauses in the environment which in turn required normalizing
// `Self::Input`.
// pretty-expanded FIXME #23616
pub trait Parser {
type Input;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn pairwise_sub<T:DoubleEndedIterator<Item=isize>>(mut t: T) -> isize {
let mut result = 0;

View File

@ -12,7 +12,6 @@
// `Item` originates in a where-clause, not the declaration of
// `T`. Issue #20300.
// pretty-expanded FIXME #23616
#![feature(core)]

View File

@ -10,7 +10,6 @@
// Test where the impl self type uses a projection from a constant type.
// pretty-expanded FIXME #23616
trait Int
{

View File

@ -11,7 +11,6 @@
// Test that we are handle to correctly handle a projection type
// that appears in a supertrait bound. Issue #20559.
// pretty-expanded FIXME #23616
trait A
{

View File

@ -10,7 +10,6 @@
// Test associated type references in a struct literal. Issue #20535.
// pretty-expanded FIXME #23616
pub trait Foo {
type Bar;

View File

@ -10,7 +10,6 @@
// Test equality constraints on associated types in a where clause.
// pretty-expanded FIXME #23616
pub trait Foo {
type A;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
trait Get {
type Value;

View File

@ -11,7 +11,6 @@
// Test references to the trait `Stream` in the bounds for associated
// types defined on `Stream`. Issue #20551.
// pretty-expanded FIXME #23616
trait Stream {
type Car;

View File

@ -11,7 +11,6 @@
// Test that we correctly normalize the type of a struct field
// which has an associated type.
// pretty-expanded FIXME #23616
pub trait UnifyKey {
type Value;

View File

@ -11,7 +11,6 @@
// Test that we correctly normalize the type of a struct field
// which has an associated type.
// pretty-expanded FIXME #23616
pub trait UnifyKey {
type Value;

View File

@ -10,7 +10,6 @@
// Test paths to associated types using the type-parameter-only sugar.
// pretty-expanded FIXME #23616
pub trait Foo {
type A;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![feature(main)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![feature(unsafe_destructor)]
#![feature(unsafe_no_drop_flag)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
pub fn main() {
let mut sum = 0;

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
trait Pushable<T> {
fn push_val(&mut self, t: T);

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
fn f<T>(x: Vec<T>) -> T { return x.into_iter().next().unwrap(); }

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![feature(core)]

View File

@ -10,7 +10,6 @@
// Check that issue #954 stays fixed
// pretty-expanded FIXME #23616
pub fn main() {
match -1 { -1 => {}, _ => panic!("wat") }

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
use std::sync::Arc;
fn dispose(_x: Arc<bool>) { }

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
pub fn main() {
struct Foo { x: isize, y: isize }

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn asBlock<F>(f: F) -> usize where F: FnOnce() -> usize {
return f();

View File

@ -13,7 +13,6 @@
// no-reformat
// pretty-expanded FIXME #23616
/*
*

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn force<F>(f: F) -> isize where F: FnOnce() -> isize { return f(); }

View File

@ -11,7 +11,6 @@
// pretty-expanded FIXME #23616
pub fn main() {
if !false { assert!((true)); } else { assert!((false)); }

View File

@ -10,7 +10,6 @@
// Basic boolean tests
// pretty-expanded FIXME #23616
use std::cmp::Ordering::{Equal, Greater, Less};
use std::ops::{BitAnd, BitOr, BitXor};

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
struct Foo(isize, isize);

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -14,7 +14,6 @@
// that the main function can read the variable too while
// the closures are in scope. Issue #6801.
// pretty-expanded FIXME #23616
fn a() -> i32 {
let mut x = 3;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
pub fn main() {
let x = [22];

View File

@ -10,7 +10,6 @@
// Test that a `&mut` inside of an `&` is freezable.
// pretty-expanded FIXME #23616
struct MutSlice<'a, T:'a> {
data: &'a mut [T]

View File

@ -11,7 +11,6 @@
// Check that we do not ICE when compiling this
// macro, which reuses the expression `$id`
// pretty-expanded FIXME #23616
#![feature(box_patterns)]
#![feature(box_syntax)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![allow(unknown_features)]
#![feature(box_syntax)]

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
fn want_slice(v: &[isize]) -> isize {
let mut sum = 0;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
pub fn main() {
let mut x = None;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
struct Counter {
value: usize

View File

@ -12,7 +12,6 @@
// limited to the deref operation itself, and does not infect the
// block as a whole.
// pretty-expanded FIXME #23616
struct Box {
x: usize

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
use std::cell::Cell;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn foo(s: &String) -> bool {
match &**s {

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn foo<'r>(s: &'r usize) -> bool {
match s {

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
pub fn main() {
let (&x, &y) = (&3, &'a');

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn select<'r>(x: &'r Option<isize>, y: &'r Option<isize>) -> &'r Option<isize> {
match (x, y) {

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn foo<T:Clone>(x: &T) -> T{
match x {

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
pub fn main() {
let mut i = 0;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
trait Speak : Sized {
fn say(&self, s:&str) -> String;

View File

@ -14,7 +14,6 @@
// a Send. Basically this just makes sure rustc is using
// each_bound_trait_and_supertraits in type_contents correctly.
// pretty-expanded FIXME #23616
use std::sync::mpsc::{channel, Sender};

View File

@ -14,7 +14,6 @@
// Tests "capabilities" granted by traits with super-builtin-kinds,
// even when using them cross-crate.
// pretty-expanded FIXME #23616
extern crate trait_superkinds_in_metadata;

View File

@ -12,7 +12,6 @@
// builtin-kinds, e.g., if a trait requires Send to implement, then
// at usage site of that trait, we know we have the Send capability.
// pretty-expanded FIXME #23616
use std::sync::mpsc::{channel, Sender, Receiver};

View File

@ -11,7 +11,6 @@
// Tests the ability for the Self type in default methods to use
// capabilities granted by builtin kinds as supertraits.
// pretty-expanded FIXME #23616
use std::sync::mpsc::{Sender, channel};

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
struct X {
a: isize

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn foo() -> isize { 22 }

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn each<T, F>(x: &[T], mut f: F) where F: FnMut(&T) {
for val in x {

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
#![feature(unboxed_closures)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
pub fn main() {
let i: isize = 'Q' as isize;

View File

@ -10,7 +10,6 @@
// aux-build:cci_nested_lib.rs
// pretty-expanded FIXME #23616
#![feature(globs)]

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
use std::cell::Cell;

View File

@ -13,7 +13,6 @@
// check that cfg correctly chooses between the macro impls (see also
// cfg-macros-notfoo.rs)
// pretty-expanded FIXME #23616
#[cfg(foo)]
#[macro_use]

View File

@ -13,7 +13,6 @@
// check that cfg correctly chooses between the macro impls (see also
// cfg-macros-foo.rs)
// pretty-expanded FIXME #23616
#[cfg(foo)]
#[macro_use]

View File

@ -11,7 +11,6 @@
// compile-flags: --cfg fooA --cfg fooB
// fooA AND !bar
// pretty-expanded FIXME #23616
#[cfg(all(fooA, not(bar)))]
fn foo1() -> isize { 1 }

View File

@ -10,7 +10,6 @@
// pretty-expanded FIXME #23616
pub fn main() {
let c: char = 'x';

View File

@ -10,7 +10,6 @@
// Checks that mutable static items can have mutable slices
// pretty-expanded FIXME #23616
static mut TEST: &'static mut [isize] = &mut [1];

View File

@ -11,7 +11,6 @@
// Check that the various ways of getting to a reference to a vec (both sized
// and unsized) work properly.
// pretty-expanded FIXME #23616
const aa: [isize; 3] = [1, 2, 3];
const ab: &'static [isize; 3] = &aa;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
/* Test that exporting a class also exports its
public fields and methods */

View File

@ -9,7 +9,6 @@
// except according to those terms.
// aux-build:cci_class_2.rs
// pretty-expanded FIXME #23616
extern crate cci_class_2;
use cci_class_2::kitties::cat;

View File

@ -9,7 +9,6 @@
// except according to those terms.
// aux-build:cci_class_3.rs
// pretty-expanded FIXME #23616
extern crate cci_class_3;
use cci_class_3::kitties::cat;

View File

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
struct cat {
meows : usize,

View File

@ -9,7 +9,6 @@
// except according to those terms.
// aux-build:cci_class_6.rs
// pretty-expanded FIXME #23616
extern crate cci_class_6;
use cci_class_6::kitties::cat;

View File

@ -9,7 +9,6 @@
// except according to those terms.
// pretty-expanded FIXME #23616
struct cat<U> {
info : Vec<U> ,

View File

@ -9,7 +9,6 @@
// except according to those terms.
// aux-build:cci_class_4.rs
// pretty-expanded FIXME #23616
extern crate cci_class_4;
use cci_class_4::kitties::cat;

View File

@ -9,7 +9,6 @@
// except according to those terms.
// aux-build:cci_class.rs
// pretty-expanded FIXME #23616
extern crate cci_class;
use cci_class::kitties::cat;

Some files were not shown because too many files have changed in this diff Show More