diff options
| author | bors <bors@rust-lang.org> | 2015-01-08 18:40:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-08 18:40:04 +0000 |
| commit | 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6 (patch) | |
| tree | b7ebe956eeb308942c79bb1cd8ca1c4fc016fe83 /src/libcore | |
| parent | a8a210b57ef6b2f5f66b8798c80acfde70c9d2e7 (diff) | |
| parent | 7541f82faba6b2839b5e640605d7caab6cc6ec4f (diff) | |
| download | rust-00b112c45a604fa6f4b59af2a40c9deeadfdb7c6.tar.gz rust-00b112c45a604fa6f4b59af2a40c9deeadfdb7c6.zip | |
auto merge of #20760 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/any.rs | 2 | ||||
| -rw-r--r-- | src/libcore/array.rs | 2 | ||||
| -rw-r--r-- | src/libcore/cell.rs | 6 | ||||
| -rw-r--r-- | src/libcore/clone.rs | 2 | ||||
| -rw-r--r-- | src/libcore/cmp.rs | 4 | ||||
| -rw-r--r-- | src/libcore/finally.rs | 2 | ||||
| -rw-r--r-- | src/libcore/fmt/mod.rs | 20 | ||||
| -rw-r--r-- | src/libcore/fmt/rt.rs | 2 | ||||
| -rw-r--r-- | src/libcore/intrinsics.rs | 4 | ||||
| -rw-r--r-- | src/libcore/iter.rs | 44 | ||||
| -rw-r--r-- | src/libcore/lib.rs | 5 | ||||
| -rw-r--r-- | src/libcore/macros.rs | 4 | ||||
| -rw-r--r-- | src/libcore/nonzero.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 44 | ||||
| -rw-r--r-- | src/libcore/option.rs | 4 | ||||
| -rw-r--r-- | src/libcore/ptr.rs | 2 | ||||
| -rw-r--r-- | src/libcore/raw.rs | 2 | ||||
| -rw-r--r-- | src/libcore/result.rs | 2 | ||||
| -rw-r--r-- | src/libcore/simd.rs | 22 | ||||
| -rw-r--r-- | src/libcore/slice.rs | 52 |
20 files changed, 114 insertions, 113 deletions
diff --git a/src/libcore/any.rs b/src/libcore/any.rs index 25007bfde93..797687a9ad9 100644 --- a/src/libcore/any.rs +++ b/src/libcore/any.rs @@ -89,7 +89,7 @@ use intrinsics::TypeId; #[stable] pub trait Any: 'static { /// Get the `TypeId` of `self` - #[experimental = "this method will likely be replaced by an associated static"] + #[unstable = "this method will likely be replaced by an associated static"] fn get_type_id(&self) -> TypeId; } diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 0cea0b3d88e..c07fac108d6 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -12,7 +12,7 @@ //! up to a certain length. Eventually we should able to generalize //! to all lengths. -#![experimental] // not yet reviewed +#![unstable] // not yet reviewed use clone::Clone; use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 674364269f1..6db01b7cb7a 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -202,7 +202,7 @@ impl<T:Copy> Cell<T> { /// /// This function is `unsafe` because `UnsafeCell`'s field is public. #[inline] - #[experimental] + #[unstable] pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> { &self.value } @@ -332,7 +332,7 @@ impl<T> RefCell<T> { /// /// This function is `unsafe` because `UnsafeCell`'s field is public. #[inline] - #[experimental] + #[unstable] pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> { &self.value } @@ -424,7 +424,7 @@ impl<'b, T> Deref for Ref<'b, T> { /// /// A `Clone` implementation would interfere with the widespread /// use of `r.borrow().clone()` to clone the contents of a `RefCell`. -#[experimental = "likely to be moved to a method, pending language changes"] +#[unstable = "likely to be moved to a method, pending language changes"] pub fn clone_ref<'b, T:Clone>(orig: &Ref<'b, T>) -> Ref<'b, T> { Ref { _value: orig._value, diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 3149247a83a..ffa6d085543 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -81,7 +81,7 @@ clone_impl! { char } macro_rules! extern_fn_clone { ($($A:ident),*) => ( - #[experimental = "this may not be sufficient for fns with region parameters"] + #[unstable = "this may not be sufficient for fns with region parameters"] impl<$($A,)* ReturnType> Clone for extern "Rust" fn($($A),*) -> ReturnType { /// Return a copy of a function pointer #[inline] diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index c3dfd5f5159..c1f1997df74 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -290,7 +290,7 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T { /// /// Returns the first argument if the comparison determines them to be equal. #[inline] -#[experimental] +#[unstable] pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> { match v1.partial_cmp(&v2) { Some(Less) | Some(Equal) => Some(v1), @@ -303,7 +303,7 @@ pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> { /// /// Returns the first argument if the comparison determines them to be equal. #[inline] -#[experimental] +#[unstable] pub fn partial_max<T: PartialOrd>(v1: T, v2: T) -> Option<T> { match v1.partial_cmp(&v2) { Some(Less) => Some(v2), diff --git a/src/libcore/finally.rs b/src/libcore/finally.rs index 2b48b2bf81a..a21ec892dd7 100644 --- a/src/libcore/finally.rs +++ b/src/libcore/finally.rs @@ -32,7 +32,7 @@ //! # } //! ``` -#![experimental] +#![unstable] use ops::{Drop, FnMut, FnOnce}; diff --git a/src/libcore/fmt/mod.rs b/src/libcore/fmt/mod.rs index 1d3767c9e33..67d5482898e 100644 --- a/src/libcore/fmt/mod.rs +++ b/src/libcore/fmt/mod.rs @@ -36,7 +36,7 @@ mod num; mod float; pub mod rt; -#[experimental = "core and I/O reconciliation may alter this definition"] +#[unstable = "core and I/O reconciliation may alter this definition"] /// The type returned by formatter methods. pub type Result = result::Result<(), Error>; @@ -45,7 +45,7 @@ pub type Result = result::Result<(), Error>; /// This type does not support transmission of an error other than that an error /// occurred. Any extra information must be arranged to be transmitted through /// some other means. -#[experimental = "core and I/O reconciliation may alter this definition"] +#[unstable = "core and I/O reconciliation may alter this definition"] #[derive(Copy)] pub struct Error; @@ -58,7 +58,7 @@ pub struct Error; /// This trait should generally not be implemented by consumers of the standard /// library. The `write!` macro accepts an instance of `io::Writer`, and the /// `io::Writer` trait is favored over implementing this trait. -#[experimental = "waiting for core and I/O reconciliation"] +#[unstable = "waiting for core and I/O reconciliation"] pub trait Writer { /// Writes a slice of bytes into this writer, returning whether the write /// succeeded. @@ -123,7 +123,7 @@ enum Void {} /// family of functions. It contains a function to format the given value. At /// compile time it is ensured that the function and the value have the correct /// types, and then this struct is used to canonicalize arguments to one type. -#[experimental = "implementation detail of the `format_args!` macro"] +#[unstable = "implementation detail of the `format_args!` macro"] #[derive(Copy)] pub struct Argument<'a> { value: &'a Void, @@ -162,7 +162,7 @@ impl<'a> Arguments<'a> { /// When using the format_args!() macro, this function is used to generate the /// Arguments structure. #[doc(hidden)] #[inline] - #[experimental = "implementation detail of the `format_args!` macro"] + #[unstable = "implementation detail of the `format_args!` macro"] pub fn new(pieces: &'a [&'a str], args: &'a [Argument<'a>]) -> Arguments<'a> { Arguments { @@ -179,7 +179,7 @@ impl<'a> Arguments<'a> { /// created with `argumentuint`. However, failing to do so doesn't cause /// unsafety, but will ignore invalid . #[doc(hidden)] #[inline] - #[experimental = "implementation detail of the `format_args!` macro"] + #[unstable = "implementation detail of the `format_args!` macro"] pub fn with_placeholders(pieces: &'a [&'a str], fmt: &'a [rt::Argument<'a>], args: &'a [Argument<'a>]) -> Arguments<'a> { @@ -301,7 +301,7 @@ pub trait UpperExp { /// /// * output - the buffer to write output to /// * args - the precompiled arguments generated by `format_args!` -#[experimental = "libcore and I/O have yet to be reconciled, and this is an \ +#[unstable = "libcore and I/O have yet to be reconciled, and this is an \ implementation detail which should not otherwise be exported"] pub fn write(output: &mut Writer, args: Arguments) -> Result { let mut formatter = Formatter { @@ -563,7 +563,7 @@ impl<'a> Formatter<'a> { } /// Flags for formatting (packed version of rt::Flag) - #[experimental = "return type may change and method was just created"] + #[unstable = "return type may change and method was just created"] pub fn flags(&self) -> uint { self.flags } /// Character used as 'fill' whenever there is alignment @@ -592,7 +592,7 @@ impl Show for Error { /// This is a function which calls are emitted to by the compiler itself to /// create the Argument structures that are passed into the `format` function. #[doc(hidden)] #[inline] -#[experimental = "implementation detail of the `format_args!` macro"] +#[unstable = "implementation detail of the `format_args!` macro"] pub fn argument<'a, T>(f: fn(&T, &mut Formatter) -> Result, t: &'a T) -> Argument<'a> { Argument::new(t, f) @@ -601,7 +601,7 @@ pub fn argument<'a, T>(f: fn(&T, &mut Formatter) -> Result, /// When the compiler determines that the type of an argument *must* be a uint /// (such as for width and precision), then it invokes this method. #[doc(hidden)] #[inline] -#[experimental = "implementation detail of the `format_args!` macro"] +#[unstable = "implementation detail of the `format_args!` macro"] pub fn argumentuint<'a>(s: &'a uint) -> Argument<'a> { Argument::from_uint(s) } diff --git a/src/libcore/fmt/rt.rs b/src/libcore/fmt/rt.rs index 6dbda3d8445..8d8e8c4b703 100644 --- a/src/libcore/fmt/rt.rs +++ b/src/libcore/fmt/rt.rs @@ -14,7 +14,7 @@ //! These definitions are similar to their `ct` equivalents, but differ in that //! these can be statically allocated and are slightly optimized for the runtime -#![experimental = "implementation detail of the `format_args!` macro"] +#![unstable = "implementation detail of the `format_args!` macro"] pub use self::Alignment::*; pub use self::Count::*; diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index c8b3616a404..5924d515dda 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -39,7 +39,7 @@ //! guaranteed to happen in order. This is the standard mode for working //! with atomic types and is equivalent to Java's `volatile`. -#![experimental] +#![unstable] #![allow(missing_docs)] #[cfg(not(stage0))] @@ -333,7 +333,7 @@ extern "rust-intrinsic" { /// Invokes memset on the specified pointer, setting `count * size_of::<T>()` /// bytes of memory starting at `dst` to `c`. - #[experimental = "uncertain about naming and semantics"] + #[unstable = "uncertain about naming and semantics"] pub fn set_memory<T>(dst: *mut T, val: u8, count: uint); /// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 273a51665ce..d4aa4c99a76 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -942,7 +942,7 @@ pub trait IteratorExt: Iterator + Sized { } /// Use an iterator to reverse a container in place. - #[experimental = "uncertain about placement or widespread use"] + #[unstable = "uncertain about placement or widespread use"] fn reverse_in_place<'a, T: 'a>(&mut self) where Self: Iterator<Item=&'a mut T> + DoubleEndedIterator { @@ -974,7 +974,7 @@ pub trait DoubleEndedIterator: Iterator { /// Calling `next()` or `next_back()` on a `RandomAccessIterator` /// reduces the indexable range accordingly. That is, `it.idx(1)` will become `it.idx(0)` /// after `it.next()` is called. -#[experimental = "not widely used, may be better decomposed into Index and ExactSizeIterator"] +#[unstable = "not widely used, may be better decomposed into Index and ExactSizeIterator"] pub trait RandomAccessIterator: Iterator { /// Return the number of indexable elements. At most `std::uint::MAX` /// elements are indexable, even if the iterator represents a longer range. @@ -1049,7 +1049,7 @@ impl<I> DoubleEndedIterator for Rev<I> where I: DoubleEndedIterator { fn next_back(&mut self) -> Option<<I as Iterator>::Item> { self.iter.next() } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<I> RandomAccessIterator for Rev<I> where I: DoubleEndedIterator + RandomAccessIterator { #[inline] fn indexable(&self) -> uint { self.iter.indexable() } @@ -1084,7 +1084,7 @@ impl<'a, I> DoubleEndedIterator for ByRef<'a, I> where I: 'a + DoubleEndedIterat } /// A trait for iterators over elements which can be added together -#[experimental = "needs to be re-evaluated as part of numerics reform"] +#[unstable = "needs to be re-evaluated as part of numerics reform"] pub trait AdditiveIterator<A> { /// Iterates over the entire iterator, summing up all the elements /// @@ -1102,7 +1102,7 @@ pub trait AdditiveIterator<A> { macro_rules! impl_additive { ($A:ty, $init:expr) => { - #[experimental = "trait is experimental"] + #[unstable = "trait is experimental"] impl<T: Iterator<Item=$A>> AdditiveIterator<$A> for T { #[inline] fn sum(self) -> $A { @@ -1125,7 +1125,7 @@ impl_additive! { f32, 0.0 } impl_additive! { f64, 0.0 } /// A trait for iterators over elements which can be multiplied together. -#[experimental = "needs to be re-evaluated as part of numerics reform"] +#[unstable = "needs to be re-evaluated as part of numerics reform"] pub trait MultiplicativeIterator<A> { /// Iterates over the entire iterator, multiplying all the elements /// @@ -1146,7 +1146,7 @@ pub trait MultiplicativeIterator<A> { macro_rules! impl_multiplicative { ($A:ty, $init:expr) => { - #[experimental = "trait is experimental"] + #[unstable = "trait is experimental"] impl<T: Iterator<Item=$A>> MultiplicativeIterator<$A> for T { #[inline] fn product(self) -> $A { @@ -1287,7 +1287,7 @@ impl<I> Iterator for Cycle<I> where I: Clone + Iterator { } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<I> RandomAccessIterator for Cycle<I> where I: Clone + RandomAccessIterator, { @@ -1372,7 +1372,7 @@ impl<T, A, B> DoubleEndedIterator for Chain<A, B> where } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<T, A, B> RandomAccessIterator for Chain<A, B> where A: RandomAccessIterator<Item=T>, B: RandomAccessIterator<Item=T>, @@ -1464,7 +1464,7 @@ impl<T, U, A, B> DoubleEndedIterator for Zip<A, B> where } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<T, U, A, B> RandomAccessIterator for Zip<A, B> where A: RandomAccessIterator<Item=T>, B: RandomAccessIterator<Item=U>, @@ -1546,7 +1546,7 @@ impl<A, B, I, F> DoubleEndedIterator for Map<A, B, I, F> where } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<A, B, I, F> RandomAccessIterator for Map<A, B, I, F> where I: RandomAccessIterator<Item=A>, F: FnMut(A) -> B, @@ -1735,7 +1735,7 @@ impl<I> DoubleEndedIterator for Enumerate<I> where } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<I> RandomAccessIterator for Enumerate<I> where I: RandomAccessIterator { #[inline] fn indexable(&self) -> uint { @@ -1961,7 +1961,7 @@ impl<I> Iterator for Skip<I> where I: Iterator { } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<I> RandomAccessIterator for Skip<I> where I: RandomAccessIterator{ #[inline] fn indexable(&self) -> uint { @@ -2016,7 +2016,7 @@ impl<I> Iterator for Take<I> where I: Iterator{ } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<I> RandomAccessIterator for Take<I> where I: RandomAccessIterator{ #[inline] fn indexable(&self) -> uint { @@ -2229,7 +2229,7 @@ impl<I> DoubleEndedIterator for Fuse<I> where I: DoubleEndedIterator { } // Allow RandomAccessIterators to be fused without affecting random-access behavior -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<I> RandomAccessIterator for Fuse<I> where I: RandomAccessIterator { #[inline] fn indexable(&self) -> uint { @@ -2246,7 +2246,7 @@ impl<I> Fuse<I> { /// Resets the fuse such that the next call to .next() or .next_back() will /// call the underlying iterator again even if it previously returned None. #[inline] - #[experimental = "seems marginal"] + #[unstable = "seems marginal"] pub fn reset_fuse(&mut self) { self.done = false } @@ -2315,7 +2315,7 @@ impl<A, I, F> DoubleEndedIterator for Inspect<A, I, F> where } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<A, I, F> RandomAccessIterator for Inspect<A, I, F> where I: RandomAccessIterator<Item=A>, F: FnMut(&A), @@ -2364,7 +2364,7 @@ impl<A, I, F> RandomAccessIterator for Inspect<A, I, F> where /// println!("{}", i); /// } /// ``` -#[experimental] +#[unstable] pub struct Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> { f: F, /// Internal state that will be passed to the closure on the next iteration @@ -2385,7 +2385,7 @@ impl<A, St, F> Clone for Unfold<A, St, F> where } } -#[experimental] +#[unstable] impl<A, St, F> Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> { /// Creates a new iterator with the specified closure as the "iterator /// function" and an initial state to eventually pass to the closure @@ -2778,7 +2778,7 @@ impl<A: Clone> DoubleEndedIterator for Repeat<A> { fn next_back(&mut self) -> Option<A> { self.idx(0) } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<A: Clone> RandomAccessIterator for Repeat<A> { #[inline] fn indexable(&self) -> uint { uint::MAX } @@ -2790,12 +2790,12 @@ type IterateState<T, F> = (F, Option<T>, bool); /// An iterator that repeatedly applies a given function, starting /// from a given seed value. -#[experimental] +#[unstable] pub type Iterate<T, F> = Unfold<T, IterateState<T, F>, fn(&mut IterateState<T, F>) -> Option<T>>; /// Create a new iterator that produces an infinite sequence of /// repeated applications of the given function `f`. -#[experimental] +#[unstable] pub fn iterate<T, F>(seed: T, f: F) -> Iterate<T, F> where T: Clone, F: FnMut(T) -> T, diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index af5aba53bf4..28f8cf588be 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -48,7 +48,7 @@ // separate crate, libcoretest, to avoid bizarre issues. #![crate_name = "core"] -#![experimental] +#![unstable] #![staged_api] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", @@ -59,9 +59,10 @@ #![no_std] #![allow(unknown_features, raw_pointer_derive)] #![cfg_attr(stage0, allow(unused_attributes))] -#![feature(intrinsics, lang_items)] +#![allow(unknown_features)] #![feature(intrinsics, lang_items)] #![feature(simd, unsafe_destructor, slicing_syntax)] #![feature(unboxed_closures)] +#![allow(unknown_features)] #![feature(int_uint)] #![deny(missing_docs)] #[macro_use] diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index bfe88fff22f..f6415518864 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -15,7 +15,7 @@ macro_rules! panic { panic!("explicit panic") ); ($msg:expr) => ({ - static _MSG_FILE_LINE: (&'static str, &'static str, uint) = ($msg, file!(), line!()); + static _MSG_FILE_LINE: (&'static str, &'static str, usize) = ($msg, file!(), line!()); ::core::panicking::panic(&_MSG_FILE_LINE) }); ($fmt:expr, $($arg:tt)*) => ({ @@ -23,7 +23,7 @@ macro_rules! panic { // used inside a dead function. Just `#[allow(dead_code)]` is // insufficient, since the user may have // `#[forbid(dead_code)]` and which cannot be overridden. - static _FILE_LINE: (&'static str, uint) = (file!(), line!()); + static _FILE_LINE: (&'static str, usize) = (file!(), line!()); ::core::panicking::panic_fmt(format_args!($fmt, $($arg)*), &_FILE_LINE) }); } diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index 087404da624..abaf2529323 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -32,7 +32,7 @@ unsafe impl Zeroable for u64 {} /// NULL or 0 that might allow certain optimizations. #[lang="non_zero"] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show)] -#[experimental] +#[unstable] pub struct NonZero<T: Zeroable>(T); impl<T: Zeroable> NonZero<T> { diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 91fed8a31bd..57415f4331d 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -726,7 +726,7 @@ impl UnsignedInt for u32 {} impl UnsignedInt for u64 {} /// A generic trait for converting a value to a number. -#[experimental = "trait is likely to be removed"] +#[unstable = "trait is likely to be removed"] pub trait ToPrimitive { /// Converts the value of `self` to an `int`. #[inline] @@ -991,7 +991,7 @@ impl_to_primitive_float! { f32 } impl_to_primitive_float! { f64 } /// A generic trait for converting a number to a value. -#[experimental = "trait is likely to be removed"] +#[unstable = "trait is likely to be removed"] pub trait FromPrimitive : ::marker::Sized { /// Convert an `int` to return an optional value of this type. If the /// value cannot be represented by this value, the `None` is returned. @@ -1073,73 +1073,73 @@ pub trait FromPrimitive : ::marker::Sized { } /// A utility function that just calls `FromPrimitive::from_int`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_int<A: FromPrimitive>(n: int) -> Option<A> { FromPrimitive::from_int(n) } /// A utility function that just calls `FromPrimitive::from_i8`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_i8<A: FromPrimitive>(n: i8) -> Option<A> { FromPrimitive::from_i8(n) } /// A utility function that just calls `FromPrimitive::from_i16`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_i16<A: FromPrimitive>(n: i16) -> Option<A> { FromPrimitive::from_i16(n) } /// A utility function that just calls `FromPrimitive::from_i32`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_i32<A: FromPrimitive>(n: i32) -> Option<A> { FromPrimitive::from_i32(n) } /// A utility function that just calls `FromPrimitive::from_i64`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_i64<A: FromPrimitive>(n: i64) -> Option<A> { FromPrimitive::from_i64(n) } /// A utility function that just calls `FromPrimitive::from_uint`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_uint<A: FromPrimitive>(n: uint) -> Option<A> { FromPrimitive::from_uint(n) } /// A utility function that just calls `FromPrimitive::from_u8`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_u8<A: FromPrimitive>(n: u8) -> Option<A> { FromPrimitive::from_u8(n) } /// A utility function that just calls `FromPrimitive::from_u16`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_u16<A: FromPrimitive>(n: u16) -> Option<A> { FromPrimitive::from_u16(n) } /// A utility function that just calls `FromPrimitive::from_u32`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_u32<A: FromPrimitive>(n: u32) -> Option<A> { FromPrimitive::from_u32(n) } /// A utility function that just calls `FromPrimitive::from_u64`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_u64<A: FromPrimitive>(n: u64) -> Option<A> { FromPrimitive::from_u64(n) } /// A utility function that just calls `FromPrimitive::from_f32`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_f32<A: FromPrimitive>(n: f32) -> Option<A> { FromPrimitive::from_f32(n) } /// A utility function that just calls `FromPrimitive::from_f64`. -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn from_f64<A: FromPrimitive>(n: f64) -> Option<A> { FromPrimitive::from_f64(n) } @@ -1190,13 +1190,13 @@ impl_from_primitive! { f64, to_f64 } /// ``` /// #[inline] -#[experimental = "likely to be removed"] +#[unstable = "likely to be removed"] pub fn cast<T: NumCast,U: NumCast>(n: T) -> Option<U> { NumCast::from(n) } /// An interface for casting between machine scalars. -#[experimental = "trait is likely to be removed"] +#[unstable = "trait is likely to be removed"] pub trait NumCast: ToPrimitive { /// Creates a number from another value that can be converted into a primitive via the /// `ToPrimitive` trait. @@ -1394,20 +1394,20 @@ pub trait Float } /// A generic trait for converting a string with a radix (base) to a value -#[experimental = "might need to return Result"] +#[unstable = "might need to return Result"] pub trait FromStrRadix { fn from_str_radix(str: &str, radix: uint) -> Option<Self>; } /// A utility function that just calls FromStrRadix::from_str_radix. -#[experimental = "might need to return Result"] +#[unstable = "might need to return Result"] pub fn from_str_radix<T: FromStrRadix>(str: &str, radix: uint) -> Option<T> { FromStrRadix::from_str_radix(str, radix) } macro_rules! from_str_radix_float_impl { ($T:ty) => { - #[experimental = "might need to return Result"] + #[unstable = "might need to return Result"] impl FromStr for $T { /// Convert a string in base 10 to a float. /// Accepts an optional decimal exponent. @@ -1440,7 +1440,7 @@ macro_rules! from_str_radix_float_impl { } } - #[experimental = "might need to return Result"] + #[unstable = "might need to return Result"] impl FromStrRadix for $T { /// Convert a string in a given base to a float. /// @@ -1604,7 +1604,7 @@ from_str_radix_float_impl! { f64 } macro_rules! from_str_radix_int_impl { ($T:ty) => { - #[experimental = "might need to return Result"] + #[unstable = "might need to return Result"] impl FromStr for $T { #[inline] fn from_str(src: &str) -> Option<$T> { @@ -1612,7 +1612,7 @@ macro_rules! from_str_radix_int_impl { } } - #[experimental = "might need to return Result"] + #[unstable = "might need to return Result"] impl FromStrRadix for $T { fn from_str_radix(src: &str, radix: uint) -> Option<$T> { assert!(radix >= 2 && radix <= 36, diff --git a/src/libcore/option.rs b/src/libcore/option.rs index deee67b6d2f..41eecb4649d 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -477,7 +477,7 @@ impl<T> Option<T> { /// assert_eq!(x.ok_or(0i), Err(0i)); /// ``` #[inline] - #[experimental] + #[unstable] pub fn ok_or<E>(self, err: E) -> Result<T, E> { match self { Some(v) => Ok(v), @@ -498,7 +498,7 @@ impl<T> Option<T> { /// assert_eq!(x.ok_or_else(|| 0i), Err(0i)); /// ``` #[inline] - #[experimental] + #[unstable] pub fn ok_or_else<E, F: FnOnce() -> E>(self, err: F) -> Result<T, E> { match self { Some(v) => Ok(v), diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index a17cd410303..ab1e69f0060 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -106,7 +106,7 @@ pub use intrinsics::copy_nonoverlapping_memory; #[unstable] pub use intrinsics::copy_memory; -#[experimental = "uncertain about naming and semantics"] +#[unstable = "uncertain about naming and semantics"] pub use intrinsics::set_memory; diff --git a/src/libcore/raw.rs b/src/libcore/raw.rs index 1ad6d43f76f..13a387c7cb0 100644 --- a/src/libcore/raw.rs +++ b/src/libcore/raw.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(missing_docs)] -#![experimental] +#![unstable] //! Contains struct definitions for the layout of compiler built-in types. //! diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 7868ec67c8a..f7421203336 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -953,7 +953,7 @@ impl<A, E, V: FromIterator<A>> FromIterator<Result<A, E>> for Result<V, E> { /// If an `Err` is encountered, it is immediately returned. /// Otherwise, the folded value is returned. #[inline] -#[experimental] +#[unstable] pub fn fold<T, V, E, diff --git a/src/libcore/simd.rs b/src/libcore/simd.rs index 1f9aebb91be..b73910d7c06 100644 --- a/src/libcore/simd.rs +++ b/src/libcore/simd.rs @@ -19,7 +19,7 @@ //! provided beyond this module. //! //! ```rust -//! #[allow(experimental)]; +//! #[allow(unstable)]; //! //! fn main() { //! use std::simd::f32x4; @@ -37,7 +37,7 @@ #![allow(non_camel_case_types)] #![allow(missing_docs)] -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] @@ -46,26 +46,26 @@ pub struct i8x16(pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8, pub i8); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] pub struct i16x8(pub i16, pub i16, pub i16, pub i16, pub i16, pub i16, pub i16, pub i16); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] pub struct i32x4(pub i32, pub i32, pub i32, pub i32); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] pub struct i64x2(pub i64, pub i64); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] @@ -74,32 +74,32 @@ pub struct u8x16(pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8, pub u8); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] pub struct u16x8(pub u16, pub u16, pub u16, pub u16, pub u16, pub u16, pub u16, pub u16); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] pub struct u32x4(pub u32, pub u32, pub u32, pub u32); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] pub struct u64x2(pub u64, pub u64); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] pub struct f32x4(pub f32, pub f32, pub f32, pub f32); -#[experimental] +#[unstable] #[simd] #[derive(Copy, Show)] #[repr(C)] diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 6c62bfda1fe..7e47c5257a3 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -457,7 +457,7 @@ impl<T> SliceExt for [T] { self.binary_search_by(|p| p.cmp(x)) } - #[experimental] + #[unstable] fn next_permutation(&mut self) -> bool where T: Ord { // These cases only have 1 permutation each, so we can't do anything. if self.len() < 2 { return false; } @@ -488,7 +488,7 @@ impl<T> SliceExt for [T] { true } - #[experimental] + #[unstable] fn prev_permutation(&mut self) -> bool where T: Ord { // These cases only have 1 permutation each, so we can't do anything. if self.len() < 2 { return false; } @@ -630,25 +630,25 @@ impl<T> ops::IndexMut<ops::FullRange> for [T] { //////////////////////////////////////////////////////////////////////////////// /// Data that is viewable as a slice. -#[experimental = "will be replaced by slice syntax"] +#[unstable = "will be replaced by slice syntax"] pub trait AsSlice<T> { /// Work with `self` as a slice. fn as_slice<'a>(&'a self) -> &'a [T]; } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<T> AsSlice<T> for [T] { #[inline(always)] fn as_slice<'a>(&'a self) -> &'a [T] { self } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<'a, T, U: ?Sized + AsSlice<T>> AsSlice<T> for &'a U { #[inline(always)] fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<'a, T, U: ?Sized + AsSlice<T>> AsSlice<T> for &'a mut U { #[inline(always)] fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } @@ -754,7 +754,7 @@ pub struct Iter<'a, T: 'a> { marker: marker::ContravariantLifetime<'a> } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::Range<uint>> for Iter<'a, T> { type Output = [T]; #[inline] @@ -763,7 +763,7 @@ impl<'a, T> ops::Index<ops::Range<uint>> for Iter<'a, T> { } } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::RangeTo<uint>> for Iter<'a, T> { type Output = [T]; #[inline] @@ -772,7 +772,7 @@ impl<'a, T> ops::Index<ops::RangeTo<uint>> for Iter<'a, T> { } } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::RangeFrom<uint>> for Iter<'a, T> { type Output = [T]; #[inline] @@ -781,7 +781,7 @@ impl<'a, T> ops::Index<ops::RangeFrom<uint>> for Iter<'a, T> { } } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::FullRange> for Iter<'a, T> { type Output = [T]; #[inline] @@ -795,7 +795,7 @@ impl<'a, T> Iter<'a, T> { /// /// This has the same lifetime as the original slice, and so the /// iterator can continue to be used while this exists. - #[experimental] + #[unstable] pub fn as_slice(&self) -> &'a [T] { make_slice!(T => &'a [T]: self.ptr, self.end) } @@ -813,7 +813,7 @@ impl<'a, T> Clone for Iter<'a, T> { fn clone(&self) -> Iter<'a, T> { *self } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<'a, T> RandomAccessIterator for Iter<'a, T> { #[inline] fn indexable(&self) -> uint { @@ -847,7 +847,7 @@ pub struct IterMut<'a, T: 'a> { } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::Range<uint>> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -855,7 +855,7 @@ impl<'a, T> ops::Index<ops::Range<uint>> for IterMut<'a, T> { self.index(&ops::FullRange).index(index) } } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::RangeTo<uint>> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -863,7 +863,7 @@ impl<'a, T> ops::Index<ops::RangeTo<uint>> for IterMut<'a, T> { self.index(&ops::FullRange).index(index) } } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::RangeFrom<uint>> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -871,7 +871,7 @@ impl<'a, T> ops::Index<ops::RangeFrom<uint>> for IterMut<'a, T> { self.index(&ops::FullRange).index(index) } } -#[experimental] +#[unstable] impl<'a, T> ops::Index<ops::FullRange> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -880,7 +880,7 @@ impl<'a, T> ops::Index<ops::FullRange> for IterMut<'a, T> { } } -#[experimental] +#[unstable] impl<'a, T> ops::IndexMut<ops::Range<uint>> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -888,7 +888,7 @@ impl<'a, T> ops::IndexMut<ops::Range<uint>> for IterMut<'a, T> { self.index_mut(&ops::FullRange).index_mut(index) } } -#[experimental] +#[unstable] impl<'a, T> ops::IndexMut<ops::RangeTo<uint>> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -896,7 +896,7 @@ impl<'a, T> ops::IndexMut<ops::RangeTo<uint>> for IterMut<'a, T> { self.index_mut(&ops::FullRange).index_mut(index) } } -#[experimental] +#[unstable] impl<'a, T> ops::IndexMut<ops::RangeFrom<uint>> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -904,7 +904,7 @@ impl<'a, T> ops::IndexMut<ops::RangeFrom<uint>> for IterMut<'a, T> { self.index_mut(&ops::FullRange).index_mut(index) } } -#[experimental] +#[unstable] impl<'a, T> ops::IndexMut<ops::FullRange> for IterMut<'a, T> { type Output = [T]; #[inline] @@ -921,7 +921,7 @@ impl<'a, T> IterMut<'a, T> { /// to consume the iterator. Consider using the `Slice` and /// `SliceMut` implementations for obtaining slices with more /// restricted lifetimes that do not consume the iterator. - #[experimental] + #[unstable] pub fn into_slice(self) -> &'a mut [T] { make_slice!(T => &'a mut [T]: self.ptr, self.end) } @@ -1269,7 +1269,7 @@ impl<'a, T> DoubleEndedIterator for Chunks<'a, T> { } } -#[experimental = "trait is experimental"] +#[unstable = "trait is experimental"] impl<'a, T> RandomAccessIterator for Chunks<'a, T> { #[inline] fn indexable(&self) -> uint { @@ -1417,7 +1417,7 @@ pub unsafe fn from_raw_mut_buf<'a, T>(p: &'a *mut T, len: uint) -> &'a mut [T] { // /// Operations on `[u8]`. -#[experimental = "needs review"] +#[unstable = "needs review"] pub mod bytes { use ptr; use slice::SliceExt; @@ -1430,7 +1430,7 @@ pub mod bytes { impl MutableByteVector for [u8] { #[inline] - #[allow(experimental)] + #[allow(unstable)] fn set_memory(&mut self, value: u8) { unsafe { ptr::set_memory(self.as_mut_ptr(), value, self.len()) }; } @@ -1506,7 +1506,7 @@ impl<T: PartialOrd> PartialOrd for [T] { } /// Extension methods for slices containing integers. -#[experimental] +#[unstable] pub trait IntSliceExt<U, S> { /// Converts the slice to an immutable slice of unsigned integers with the same width. fn as_unsigned<'a>(&'a self) -> &'a [U]; @@ -1521,7 +1521,7 @@ pub trait IntSliceExt<U, S> { macro_rules! impl_int_slice { ($u:ty, $s:ty, $t:ty) => { - #[experimental] + #[unstable] impl IntSliceExt<$u, $s> for [$t] { #[inline] fn as_unsigned(&self) -> &[$u] { unsafe { transmute(self) } } |
