Improvements to feature staging

This gets rid of the 'experimental' level, removes the non-staged_api
case (i.e. stability levels for out-of-tree crates), and lets the
staged_api attributes use 'unstable' and 'deprecated' lints.

This makes the transition period to the full feature staging design
a bit nicer.
This commit is contained in:
Brian Anderson 2015-01-07 15:48:16 -08:00
parent 5364c4853f
commit 1f70acbf4c
105 changed files with 386 additions and 392 deletions

View File

@ -126,7 +126,7 @@ unsafe impl<T: Sync + Send> Sync for Arc<T> { }
/// Weak pointers will not keep the data inside of the `Arc` alive, and can be used to break cycles /// Weak pointers will not keep the data inside of the `Arc` alive, and can be used to break cycles
/// between `Arc` pointers. /// between `Arc` pointers.
#[unsafe_no_drop_flag] #[unsafe_no_drop_flag]
#[experimental = "Weak pointers may not belong in this module."] #[unstable = "Weak pointers may not belong in this module."]
pub struct Weak<T> { pub struct Weak<T> {
// FIXME #12808: strange name to try to avoid interfering with // FIXME #12808: strange name to try to avoid interfering with
// field accesses of the contained type via Deref // field accesses of the contained type via Deref
@ -179,7 +179,7 @@ impl<T> Arc<T> {
/// ///
/// let weak_five = five.downgrade(); /// let weak_five = five.downgrade();
/// ``` /// ```
#[experimental = "Weak pointers may not belong in this module."] #[unstable = "Weak pointers may not belong in this module."]
pub fn downgrade(&self) -> Weak<T> { pub fn downgrade(&self) -> Weak<T> {
// See the clone() impl for why this is relaxed // See the clone() impl for why this is relaxed
self.inner().weak.fetch_add(1, Relaxed); self.inner().weak.fetch_add(1, Relaxed);
@ -200,12 +200,12 @@ impl<T> Arc<T> {
/// Get the number of weak references to this value. /// Get the number of weak references to this value.
#[inline] #[inline]
#[experimental] #[unstable]
pub fn weak_count<T>(this: &Arc<T>) -> uint { this.inner().weak.load(SeqCst) - 1 } pub fn weak_count<T>(this: &Arc<T>) -> uint { this.inner().weak.load(SeqCst) - 1 }
/// Get the number of strong references to this value. /// Get the number of strong references to this value.
#[inline] #[inline]
#[experimental] #[unstable]
pub fn strong_count<T>(this: &Arc<T>) -> uint { this.inner().strong.load(SeqCst) } pub fn strong_count<T>(this: &Arc<T>) -> uint { this.inner().strong.load(SeqCst) }
#[stable] #[stable]
@ -271,7 +271,7 @@ impl<T: Send + Sync + Clone> Arc<T> {
/// let mut_five = five.make_unique(); /// let mut_five = five.make_unique();
/// ``` /// ```
#[inline] #[inline]
#[experimental] #[unstable]
pub fn make_unique(&mut self) -> &mut T { pub fn make_unique(&mut self) -> &mut T {
// Note that we hold a strong reference, which also counts as a weak reference, so we only // Note that we hold a strong reference, which also counts as a weak reference, so we only
// clone if there is an additional reference of either kind. // clone if there is an additional reference of either kind.
@ -355,7 +355,7 @@ impl<T: Sync + Send> Drop for Arc<T> {
} }
} }
#[experimental = "Weak pointers may not belong in this module."] #[unstable = "Weak pointers may not belong in this module."]
impl<T: Sync + Send> Weak<T> { impl<T: Sync + Send> Weak<T> {
/// Upgrades a weak reference to a strong reference. /// Upgrades a weak reference to a strong reference.
/// ///
@ -393,7 +393,7 @@ impl<T: Sync + Send> Weak<T> {
} }
} }
#[experimental = "Weak pointers may not belong in this module."] #[unstable = "Weak pointers may not belong in this module."]
impl<T: Sync + Send> Clone for Weak<T> { impl<T: Sync + Send> Clone for Weak<T> {
/// Makes a clone of the `Weak<T>`. /// Makes a clone of the `Weak<T>`.
/// ///
@ -604,7 +604,7 @@ impl<H: Hasher, T: Hash<H>> Hash<H> for Arc<T> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(experimental)] #[allow(unstable)]
mod tests { mod tests {
use std::clone::Clone; use std::clone::Clone;
use std::sync::mpsc::channel; use std::sync::mpsc::channel;

View File

@ -44,7 +44,7 @@ use core::ops::{Deref, DerefMut};
/// } /// }
/// ``` /// ```
#[lang = "exchange_heap"] #[lang = "exchange_heap"]
#[experimental = "may be renamed; uncertain about custom allocator design"] #[unstable = "may be renamed; uncertain about custom allocator design"]
pub static HEAP: () = (); pub static HEAP: () = ();
/// A type that represents a uniquely-owned value. /// A type that represents a uniquely-owned value.

View File

@ -57,7 +57,7 @@
//! default global allocator. It is not compatible with the libc allocator API. //! default global allocator. It is not compatible with the libc allocator API.
#![crate_name = "alloc"] #![crate_name = "alloc"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -221,7 +221,7 @@ impl<T> Rc<T> {
/// ///
/// let weak_five = five.downgrade(); /// let weak_five = five.downgrade();
/// ``` /// ```
#[experimental = "Weak pointers may not belong in this module"] #[unstable = "Weak pointers may not belong in this module"]
pub fn downgrade(&self) -> Weak<T> { pub fn downgrade(&self) -> Weak<T> {
self.inc_weak(); self.inc_weak();
Weak { Weak {
@ -234,12 +234,12 @@ impl<T> Rc<T> {
/// Get the number of weak references to this value. /// Get the number of weak references to this value.
#[inline] #[inline]
#[experimental] #[unstable]
pub fn weak_count<T>(this: &Rc<T>) -> uint { this.weak() - 1 } pub fn weak_count<T>(this: &Rc<T>) -> uint { this.weak() - 1 }
/// Get the number of strong references to this value. /// Get the number of strong references to this value.
#[inline] #[inline]
#[experimental] #[unstable]
pub fn strong_count<T>(this: &Rc<T>) -> uint { this.strong() } pub fn strong_count<T>(this: &Rc<T>) -> uint { this.strong() }
/// Returns true if there are no other `Rc` or `Weak<T>` values that share the same inner value. /// Returns true if there are no other `Rc` or `Weak<T>` values that share the same inner value.
@ -255,7 +255,7 @@ pub fn strong_count<T>(this: &Rc<T>) -> uint { this.strong() }
/// rc::is_unique(&five); /// rc::is_unique(&five);
/// ``` /// ```
#[inline] #[inline]
#[experimental] #[unstable]
pub fn is_unique<T>(rc: &Rc<T>) -> bool { pub fn is_unique<T>(rc: &Rc<T>) -> bool {
weak_count(rc) == 0 && strong_count(rc) == 1 weak_count(rc) == 0 && strong_count(rc) == 1
} }
@ -277,7 +277,7 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool {
/// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u))); /// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u)));
/// ``` /// ```
#[inline] #[inline]
#[experimental] #[unstable]
pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> { pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
if is_unique(&rc) { if is_unique(&rc) {
unsafe { unsafe {
@ -311,7 +311,7 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
/// assert!(rc::get_mut(&mut x).is_none()); /// assert!(rc::get_mut(&mut x).is_none());
/// ``` /// ```
#[inline] #[inline]
#[experimental] #[unstable]
pub fn get_mut<'a, T>(rc: &'a mut Rc<T>) -> Option<&'a mut T> { pub fn get_mut<'a, T>(rc: &'a mut Rc<T>) -> Option<&'a mut T> {
if is_unique(rc) { if is_unique(rc) {
let inner = unsafe { &mut **rc._ptr }; let inner = unsafe { &mut **rc._ptr };
@ -337,7 +337,7 @@ impl<T: Clone> Rc<T> {
/// let mut_five = five.make_unique(); /// let mut_five = five.make_unique();
/// ``` /// ```
#[inline] #[inline]
#[experimental] #[unstable]
pub fn make_unique(&mut self) -> &mut T { pub fn make_unique(&mut self) -> &mut T {
if !is_unique(self) { if !is_unique(self) {
*self = Rc::new((**self).clone()) *self = Rc::new((**self).clone())
@ -615,7 +615,7 @@ impl<S: hash::Hasher, T: Hash<S>> Hash<S> for Rc<T> {
} }
} }
#[experimental = "Show is experimental."] #[unstable = "Show is experimental."]
impl<T: fmt::Show> fmt::Show for Rc<T> { impl<T: fmt::Show> fmt::Show for Rc<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Rc({:?})", **self) write!(f, "Rc({:?})", **self)
@ -635,7 +635,7 @@ impl<T: fmt::String> fmt::String for Rc<T> {
/// ///
/// See the [module level documentation](../index.html) for more. /// See the [module level documentation](../index.html) for more.
#[unsafe_no_drop_flag] #[unsafe_no_drop_flag]
#[experimental = "Weak pointers may not belong in this module."] #[unstable = "Weak pointers may not belong in this module."]
pub struct Weak<T> { pub struct Weak<T> {
// FIXME #12808: strange names to try to avoid interfering with // FIXME #12808: strange names to try to avoid interfering with
// field accesses of the contained type via Deref // field accesses of the contained type via Deref
@ -644,7 +644,7 @@ pub struct Weak<T> {
_noshare: marker::NoSync _noshare: marker::NoSync
} }
#[experimental = "Weak pointers may not belong in this module."] #[unstable = "Weak pointers may not belong in this module."]
impl<T> Weak<T> { impl<T> Weak<T> {
/// Upgrades a weak reference to a strong reference. /// Upgrades a weak reference to a strong reference.
/// ///
@ -717,7 +717,7 @@ impl<T> Drop for Weak<T> {
} }
} }
#[experimental = "Weak pointers may not belong in this module."] #[unstable = "Weak pointers may not belong in this module."]
impl<T> Clone for Weak<T> { impl<T> Clone for Weak<T> {
/// Makes a clone of the `Weak<T>`. /// Makes a clone of the `Weak<T>`.
/// ///
@ -739,7 +739,7 @@ impl<T> Clone for Weak<T> {
} }
} }
#[experimental = "Show is experimental."] #[unstable = "Show is experimental."]
impl<T: fmt::Show> fmt::Show for Weak<T> { impl<T: fmt::Show> fmt::Show for Weak<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "(Weak)") write!(f, "(Weak)")
@ -780,7 +780,7 @@ impl<T> RcBoxPtr<T> for Weak<T> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(experimental)] #[allow(unstable)]
mod tests { mod tests {
use super::{Rc, Weak, weak_count, strong_count}; use super::{Rc, Weak, weak_count, strong_count};
use std::cell::RefCell; use std::cell::RefCell;

View File

@ -20,7 +20,7 @@
//! more complex, slower arena which can hold objects of any type. //! more complex, slower arena which can hold objects of any type.
#![crate_name = "arena"] #![crate_name = "arena"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -14,7 +14,7 @@
#![crate_name = "collections"] #![crate_name = "collections"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -166,7 +166,7 @@ pub trait SliceExt {
/// assert_eq!(num_moved, 3); /// assert_eq!(num_moved, 3);
/// assert!(a == [6i, 7, 8, 4, 5]); /// assert!(a == [6i, 7, 8, 4, 5]);
/// ``` /// ```
#[experimental = "uncertain about this API approach"] #[unstable = "uncertain about this API approach"]
fn move_from(&mut self, src: Vec<Self::Item>, start: uint, end: uint) -> uint; fn move_from(&mut self, src: Vec<Self::Item>, start: uint, end: uint) -> uint;
/// Returns a subslice spanning the interval [`start`, `end`). /// Returns a subslice spanning the interval [`start`, `end`).
@ -175,7 +175,7 @@ pub trait SliceExt {
/// original slice (i.e. when `end > self.len()`) or when `start > end`. /// original slice (i.e. when `end > self.len()`) or when `start > end`.
/// ///
/// Slicing with `start` equal to `end` yields an empty slice. /// Slicing with `start` equal to `end` yields an empty slice.
#[experimental = "will be replaced by slice syntax"] #[unstable = "will be replaced by slice syntax"]
fn slice(&self, start: uint, end: uint) -> &[Self::Item]; fn slice(&self, start: uint, end: uint) -> &[Self::Item];
/// Returns a subslice from `start` to the end of the slice. /// Returns a subslice from `start` to the end of the slice.
@ -183,7 +183,7 @@ pub trait SliceExt {
/// Panics when `start` is strictly greater than the length of the original slice. /// Panics when `start` is strictly greater than the length of the original slice.
/// ///
/// Slicing from `self.len()` yields an empty slice. /// Slicing from `self.len()` yields an empty slice.
#[experimental = "will be replaced by slice syntax"] #[unstable = "will be replaced by slice syntax"]
fn slice_from(&self, start: uint) -> &[Self::Item]; fn slice_from(&self, start: uint) -> &[Self::Item];
/// Returns a subslice from the start of the slice to `end`. /// Returns a subslice from the start of the slice to `end`.
@ -191,7 +191,7 @@ pub trait SliceExt {
/// Panics when `end` is strictly greater than the length of the original slice. /// Panics when `end` is strictly greater than the length of the original slice.
/// ///
/// Slicing to `0` yields an empty slice. /// Slicing to `0` yields an empty slice.
#[experimental = "will be replaced by slice syntax"] #[unstable = "will be replaced by slice syntax"]
fn slice_to(&self, end: uint) -> &[Self::Item]; fn slice_to(&self, end: uint) -> &[Self::Item];
/// Divides one slice into two at an index. /// Divides one slice into two at an index.
@ -284,11 +284,11 @@ pub trait SliceExt {
fn first(&self) -> Option<&Self::Item>; fn first(&self) -> Option<&Self::Item>;
/// Returns all but the first element of a slice. /// Returns all but the first element of a slice.
#[experimental = "likely to be renamed"] #[unstable = "likely to be renamed"]
fn tail(&self) -> &[Self::Item]; fn tail(&self) -> &[Self::Item];
/// Returns all but the last element of a slice. /// Returns all but the last element of a slice.
#[experimental = "likely to be renamed"] #[unstable = "likely to be renamed"]
fn init(&self) -> &[Self::Item]; fn init(&self) -> &[Self::Item];
/// Returns the last element of a slice, or `None` if it is empty. /// Returns the last element of a slice, or `None` if it is empty.
@ -384,7 +384,7 @@ pub trait SliceExt {
/// original slice (i.e. when `end > self.len()`) or when `start > end`. /// original slice (i.e. when `end > self.len()`) or when `start > end`.
/// ///
/// Slicing with `start` equal to `end` yields an empty slice. /// Slicing with `start` equal to `end` yields an empty slice.
#[experimental = "will be replaced by slice syntax"] #[unstable = "will be replaced by slice syntax"]
fn slice_mut(&mut self, start: uint, end: uint) -> &mut [Self::Item]; fn slice_mut(&mut self, start: uint, end: uint) -> &mut [Self::Item];
/// Returns a mutable subslice from `start` to the end of the slice. /// Returns a mutable subslice from `start` to the end of the slice.
@ -392,7 +392,7 @@ pub trait SliceExt {
/// Panics when `start` is strictly greater than the length of the original slice. /// Panics when `start` is strictly greater than the length of the original slice.
/// ///
/// Slicing from `self.len()` yields an empty slice. /// Slicing from `self.len()` yields an empty slice.
#[experimental = "will be replaced by slice syntax"] #[unstable = "will be replaced by slice syntax"]
fn slice_from_mut(&mut self, start: uint) -> &mut [Self::Item]; fn slice_from_mut(&mut self, start: uint) -> &mut [Self::Item];
/// Returns a mutable subslice from the start of the slice to `end`. /// Returns a mutable subslice from the start of the slice to `end`.
@ -400,7 +400,7 @@ pub trait SliceExt {
/// Panics when `end` is strictly greater than the length of the original slice. /// Panics when `end` is strictly greater than the length of the original slice.
/// ///
/// Slicing to `0` yields an empty slice. /// Slicing to `0` yields an empty slice.
#[experimental = "will be replaced by slice syntax"] #[unstable = "will be replaced by slice syntax"]
fn slice_to_mut(&mut self, end: uint) -> &mut [Self::Item]; fn slice_to_mut(&mut self, end: uint) -> &mut [Self::Item];
/// Returns an iterator that allows modifying each value /// Returns an iterator that allows modifying each value
@ -412,11 +412,11 @@ pub trait SliceExt {
fn first_mut(&mut self) -> Option<&mut Self::Item>; fn first_mut(&mut self) -> Option<&mut Self::Item>;
/// Returns all but the first element of a mutable slice /// Returns all but the first element of a mutable slice
#[experimental = "likely to be renamed or removed"] #[unstable = "likely to be renamed or removed"]
fn tail_mut(&mut self) -> &mut [Self::Item]; fn tail_mut(&mut self) -> &mut [Self::Item];
/// Returns all but the last element of a mutable slice /// Returns all but the last element of a mutable slice
#[experimental = "likely to be renamed or removed"] #[unstable = "likely to be renamed or removed"]
fn init_mut(&mut self) -> &mut [Self::Item]; fn init_mut(&mut self) -> &mut [Self::Item];
/// Returns a mutable pointer to the last item in the slice. /// Returns a mutable pointer to the last item in the slice.
@ -588,7 +588,7 @@ pub trait SliceExt {
/// assert!(dst.clone_from_slice(&src2) == 3); /// assert!(dst.clone_from_slice(&src2) == 3);
/// assert!(dst == [3i, 4, 5]); /// assert!(dst == [3i, 4, 5]);
/// ``` /// ```
#[experimental] #[unstable]
fn clone_from_slice(&mut self, &[Self::Item]) -> uint where Self::Item: Clone; fn clone_from_slice(&mut self, &[Self::Item]) -> uint where Self::Item: Clone;
/// Sorts the slice, in place. /// Sorts the slice, in place.
@ -677,11 +677,11 @@ pub trait SliceExt {
fn prev_permutation(&mut self) -> bool where Self::Item: Ord; fn prev_permutation(&mut self) -> bool where Self::Item: Ord;
/// Find the first index containing a matching value. /// Find the first index containing a matching value.
#[experimental] #[unstable]
fn position_elem(&self, t: &Self::Item) -> Option<uint> where Self::Item: PartialEq; fn position_elem(&self, t: &Self::Item) -> Option<uint> where Self::Item: PartialEq;
/// Find the last index containing a matching value. /// Find the last index containing a matching value.
#[experimental] #[unstable]
fn rposition_elem(&self, t: &Self::Item) -> Option<uint> where Self::Item: PartialEq; fn rposition_elem(&self, t: &Self::Item) -> Option<uint> where Self::Item: PartialEq;
/// Return true if the slice contains an element with the given value. /// Return true if the slice contains an element with the given value.
@ -697,7 +697,7 @@ pub trait SliceExt {
fn ends_with(&self, needle: &[Self::Item]) -> bool where Self::Item: PartialEq; fn ends_with(&self, needle: &[Self::Item]) -> bool where Self::Item: PartialEq;
/// Convert `self` into a vector without clones or allocation. /// Convert `self` into a vector without clones or allocation.
#[experimental] #[unstable]
fn into_vec(self: Box<Self>) -> Vec<Self::Item>; fn into_vec(self: Box<Self>) -> Vec<Self::Item>;
} }
@ -1034,7 +1034,7 @@ impl<T: Clone, V: AsSlice<T>> SliceConcatExt<T, Vec<T>> for [V] {
/// ///
/// The last generated swap is always (0, 1), and it returns the /// The last generated swap is always (0, 1), and it returns the
/// sequence to its initial order. /// sequence to its initial order.
#[experimental] #[unstable]
#[derive(Clone)] #[derive(Clone)]
pub struct ElementSwaps { pub struct ElementSwaps {
sdir: Vec<SizeDirection>, sdir: Vec<SizeDirection>,
@ -1046,7 +1046,7 @@ pub struct ElementSwaps {
impl ElementSwaps { impl ElementSwaps {
/// Creates an `ElementSwaps` iterator for a sequence of `length` elements. /// Creates an `ElementSwaps` iterator for a sequence of `length` elements.
#[experimental] #[unstable]
pub fn new(length: uint) -> ElementSwaps { pub fn new(length: uint) -> ElementSwaps {
// Initialize `sdir` with a direction that position should move in // Initialize `sdir` with a direction that position should move in
// (all negative at the beginning) and the `size` of the // (all negative at the beginning) and the `size` of the

View File

@ -92,7 +92,7 @@ impl String {
/// assert_eq!(s.as_slice(), "hello"); /// assert_eq!(s.as_slice(), "hello");
/// ``` /// ```
#[inline] #[inline]
#[experimental = "needs investigation to see if to_string() can match perf"] #[unstable = "needs investigation to see if to_string() can match perf"]
pub fn from_str(string: &str) -> String { pub fn from_str(string: &str) -> String {
String { vec: ::slice::SliceExt::to_vec(string.as_bytes()) } String { vec: ::slice::SliceExt::to_vec(string.as_bytes()) }
} }
@ -719,7 +719,7 @@ impl<'a> FromIterator<&'a str> for String {
} }
} }
#[experimental = "waiting on Extend stabilization"] #[unstable = "waiting on Extend stabilization"]
impl Extend<char> for String { impl Extend<char> for String {
fn extend<I:Iterator<Item=char>>(&mut self, mut iterator: I) { fn extend<I:Iterator<Item=char>>(&mut self, mut iterator: I) {
let (lower_bound, _) = iterator.size_hint(); let (lower_bound, _) = iterator.size_hint();
@ -730,7 +730,7 @@ impl Extend<char> for String {
} }
} }
#[experimental = "waiting on Extend stabilization"] #[unstable = "waiting on Extend stabilization"]
impl<'a> Extend<&'a str> for String { impl<'a> Extend<&'a str> for String {
fn extend<I: Iterator<Item=&'a str>>(&mut self, mut iterator: I) { fn extend<I: Iterator<Item=&'a str>>(&mut self, mut iterator: I) {
// A guess that at least one byte per iterator element will be needed. // A guess that at least one byte per iterator element will be needed.
@ -790,7 +790,7 @@ impl<'a, 'b> PartialEq<CowString<'a>> for &'b str {
fn ne(&self, other: &CowString<'a>) -> bool { PartialEq::ne(&**self, &**other) } fn ne(&self, other: &CowString<'a>) -> bool { PartialEq::ne(&**self, &**other) }
} }
#[experimental = "waiting on Str stabilization"] #[unstable = "waiting on Str stabilization"]
impl Str for String { impl Str for String {
#[inline] #[inline]
#[stable] #[stable]
@ -814,14 +814,14 @@ impl fmt::String for String {
} }
} }
#[experimental = "waiting on fmt stabilization"] #[unstable = "waiting on fmt stabilization"]
impl fmt::Show for String { impl fmt::Show for String {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Show::fmt(&**self, f) fmt::Show::fmt(&**self, f)
} }
} }
#[experimental = "waiting on Hash stabilization"] #[unstable = "waiting on Hash stabilization"]
#[cfg(stage0)] #[cfg(stage0)]
impl<H: hash::Writer> hash::Hash<H> for String { impl<H: hash::Writer> hash::Hash<H> for String {
#[inline] #[inline]
@ -829,7 +829,7 @@ impl<H: hash::Writer> hash::Hash<H> for String {
(**self).hash(hasher) (**self).hash(hasher)
} }
} }
#[experimental = "waiting on Hash stabilization"] #[unstable = "waiting on Hash stabilization"]
#[cfg(not(stage0))] #[cfg(not(stage0))]
impl<H: hash::Writer + hash::Hasher> hash::Hash<H> for String { impl<H: hash::Writer + hash::Hasher> hash::Hash<H> for String {
#[inline] #[inline]
@ -887,7 +887,7 @@ impl ops::Deref for String {
} }
/// Wrapper type providing a `&String` reference via `Deref`. /// Wrapper type providing a `&String` reference via `Deref`.
#[experimental] #[unstable]
pub struct DerefString<'a> { pub struct DerefString<'a> {
x: DerefVec<'a, u8> x: DerefVec<'a, u8>
} }
@ -914,7 +914,7 @@ impl<'a> Deref for DerefString<'a> {
/// let string = as_string("foo").clone(); /// let string = as_string("foo").clone();
/// string_consumer(string); /// string_consumer(string);
/// ``` /// ```
#[experimental] #[unstable]
pub fn as_string<'a>(x: &'a str) -> DerefString<'a> { pub fn as_string<'a>(x: &'a str) -> DerefString<'a> {
DerefString { x: as_vec(x.as_bytes()) } DerefString { x: as_vec(x.as_bytes()) }
} }

View File

@ -376,7 +376,7 @@ impl<T> Vec<T> {
/// Note that this will drop any excess capacity. Calling this and /// Note that this will drop any excess capacity. Calling this and
/// converting back to a vector with `into_vec()` is equivalent to calling /// converting back to a vector with `into_vec()` is equivalent to calling
/// `shrink_to_fit()`. /// `shrink_to_fit()`.
#[experimental] #[unstable]
pub fn into_boxed_slice(mut self) -> Box<[T]> { pub fn into_boxed_slice(mut self) -> Box<[T]> {
self.shrink_to_fit(); self.shrink_to_fit();
unsafe { unsafe {
@ -777,7 +777,7 @@ impl<T> Vec<T> {
/// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x)); /// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x));
/// assert_eq!(newtyped_bytes.as_slice(), [Newtype(0x11), Newtype(0x22)].as_slice()); /// assert_eq!(newtyped_bytes.as_slice(), [Newtype(0x11), Newtype(0x22)].as_slice());
/// ``` /// ```
#[experimental = "API may change to provide stronger guarantees"] #[unstable = "API may change to provide stronger guarantees"]
pub fn map_in_place<U, F>(self, mut f: F) -> Vec<U> where F: FnMut(T) -> U { pub fn map_in_place<U, F>(self, mut f: F) -> Vec<U> where F: FnMut(T) -> U {
// FIXME: Assert statically that the types `T` and `U` have the same // FIXME: Assert statically that the types `T` and `U` have the same
// size. // size.
@ -995,7 +995,7 @@ impl<T: Clone> Vec<T> {
/// assert_eq!(vec, vec![1, 2, 3, 4]); /// assert_eq!(vec, vec![1, 2, 3, 4]);
/// ``` /// ```
#[inline] #[inline]
#[experimental = "likely to be replaced by a more optimized extend"] #[unstable = "likely to be replaced by a more optimized extend"]
pub fn push_all(&mut self, other: &[T]) { pub fn push_all(&mut self, other: &[T]) {
self.reserve(other.len()); self.reserve(other.len());
@ -1200,7 +1200,7 @@ impl<S: hash::Writer + hash::Hasher, T: Hash<S>> Hash<S> for Vec<T> {
} }
} }
#[experimental = "waiting on Index stability"] #[unstable = "waiting on Index stability"]
impl<T> Index<uint> for Vec<T> { impl<T> Index<uint> for Vec<T> {
type Output = T; type Output = T;
@ -1304,7 +1304,7 @@ impl<T> FromIterator<T> for Vec<T> {
} }
} }
#[experimental = "waiting on Extend stability"] #[unstable = "waiting on Extend stability"]
impl<T> Extend<T> for Vec<T> { impl<T> Extend<T> for Vec<T> {
#[inline] #[inline]
fn extend<I: Iterator<Item=T>>(&mut self, mut iterator: I) { fn extend<I: Iterator<Item=T>>(&mut self, mut iterator: I) {
@ -1457,7 +1457,7 @@ impl<T> Default for Vec<T> {
} }
} }
#[experimental = "waiting on Show stability"] #[unstable = "waiting on Show stability"]
impl<T: fmt::Show> fmt::Show for Vec<T> { impl<T: fmt::Show> fmt::Show for Vec<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Show::fmt(self.as_slice(), f) fmt::Show::fmt(self.as_slice(), f)
@ -1475,7 +1475,7 @@ impl<'a> fmt::Writer for Vec<u8> {
// Clone-on-write // Clone-on-write
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#[experimental = "unclear how valuable this alias is"] #[unstable = "unclear how valuable this alias is"]
/// A clone-on-write vector /// A clone-on-write vector
pub type CowVec<'a, T> = Cow<'a, Vec<T>, [T]>; pub type CowVec<'a, T> = Cow<'a, Vec<T>, [T]>;
@ -1693,13 +1693,13 @@ impl<'a, T> Drop for Drain<'a, T> {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Wrapper type providing a `&Vec<T>` reference via `Deref`. /// Wrapper type providing a `&Vec<T>` reference via `Deref`.
#[experimental] #[unstable]
pub struct DerefVec<'a, T> { pub struct DerefVec<'a, T> {
x: Vec<T>, x: Vec<T>,
l: ContravariantLifetime<'a> l: ContravariantLifetime<'a>
} }
#[experimental] #[unstable]
impl<'a, T> Deref for DerefVec<'a, T> { impl<'a, T> Deref for DerefVec<'a, T> {
type Target = Vec<T>; type Target = Vec<T>;
@ -1719,7 +1719,7 @@ impl<'a, T> Drop for DerefVec<'a, T> {
} }
/// Convert a slice to a wrapper type providing a `&Vec<T>` reference. /// Convert a slice to a wrapper type providing a `&Vec<T>` reference.
#[experimental] #[unstable]
pub fn as_vec<'a, T>(x: &'a [T]) -> DerefVec<'a, T> { pub fn as_vec<'a, T>(x: &'a [T]) -> DerefVec<'a, T> {
unsafe { unsafe {
DerefVec { DerefVec {

View File

@ -89,7 +89,7 @@ use intrinsics::TypeId;
#[stable] #[stable]
pub trait Any: 'static { pub trait Any: 'static {
/// Get the `TypeId` of `self` /// 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; fn get_type_id(&self) -> TypeId;
} }

View File

@ -12,7 +12,7 @@
//! up to a certain length. Eventually we should able to generalize //! up to a certain length. Eventually we should able to generalize
//! to all lengths. //! to all lengths.
#![experimental] // not yet reviewed #![unstable] // not yet reviewed
use clone::Clone; use clone::Clone;
use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering};

View File

@ -202,7 +202,7 @@ impl<T:Copy> Cell<T> {
/// ///
/// This function is `unsafe` because `UnsafeCell`'s field is public. /// This function is `unsafe` because `UnsafeCell`'s field is public.
#[inline] #[inline]
#[experimental] #[unstable]
pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> { pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> {
&self.value &self.value
} }
@ -332,7 +332,7 @@ impl<T> RefCell<T> {
/// ///
/// This function is `unsafe` because `UnsafeCell`'s field is public. /// This function is `unsafe` because `UnsafeCell`'s field is public.
#[inline] #[inline]
#[experimental] #[unstable]
pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> { pub unsafe fn as_unsafe_cell<'a>(&'a self) -> &'a UnsafeCell<T> {
&self.value &self.value
} }
@ -424,7 +424,7 @@ impl<'b, T> Deref for Ref<'b, T> {
/// ///
/// A `Clone` implementation would interfere with the widespread /// A `Clone` implementation would interfere with the widespread
/// use of `r.borrow().clone()` to clone the contents of a `RefCell`. /// 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> { pub fn clone_ref<'b, T:Clone>(orig: &Ref<'b, T>) -> Ref<'b, T> {
Ref { Ref {
_value: orig._value, _value: orig._value,

View File

@ -81,7 +81,7 @@ clone_impl! { char }
macro_rules! extern_fn_clone { macro_rules! extern_fn_clone {
($($A:ident),*) => ( ($($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 { impl<$($A,)* ReturnType> Clone for extern "Rust" fn($($A),*) -> ReturnType {
/// Return a copy of a function pointer /// Return a copy of a function pointer
#[inline] #[inline]

View File

@ -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. /// Returns the first argument if the comparison determines them to be equal.
#[inline] #[inline]
#[experimental] #[unstable]
pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> { pub fn partial_min<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
match v1.partial_cmp(&v2) { match v1.partial_cmp(&v2) {
Some(Less) | Some(Equal) => Some(v1), 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. /// Returns the first argument if the comparison determines them to be equal.
#[inline] #[inline]
#[experimental] #[unstable]
pub fn partial_max<T: PartialOrd>(v1: T, v2: T) -> Option<T> { pub fn partial_max<T: PartialOrd>(v1: T, v2: T) -> Option<T> {
match v1.partial_cmp(&v2) { match v1.partial_cmp(&v2) {
Some(Less) => Some(v2), Some(Less) => Some(v2),

View File

@ -32,7 +32,7 @@
//! # } //! # }
//! ``` //! ```
#![experimental] #![unstable]
use ops::{Drop, FnMut, FnOnce}; use ops::{Drop, FnMut, FnOnce};

View File

@ -36,7 +36,7 @@ mod num;
mod float; mod float;
pub mod rt; 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. /// The type returned by formatter methods.
pub type Result = result::Result<(), Error>; 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 /// 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 /// occurred. Any extra information must be arranged to be transmitted through
/// some other means. /// 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)] #[derive(Copy)]
pub struct Error; pub struct Error;
@ -58,7 +58,7 @@ pub struct Error;
/// This trait should generally not be implemented by consumers of the standard /// This trait should generally not be implemented by consumers of the standard
/// library. The `write!` macro accepts an instance of `io::Writer`, and the /// library. The `write!` macro accepts an instance of `io::Writer`, and the
/// `io::Writer` trait is favored over implementing this trait. /// `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 { pub trait Writer {
/// Writes a slice of bytes into this writer, returning whether the write /// Writes a slice of bytes into this writer, returning whether the write
/// succeeded. /// succeeded.
@ -123,7 +123,7 @@ enum Void {}
/// family of functions. It contains a function to format the given value. At /// 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 /// 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. /// 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)] #[derive(Copy)]
pub struct Argument<'a> { pub struct Argument<'a> {
value: &'a Void, value: &'a Void,
@ -162,7 +162,7 @@ impl<'a> Arguments<'a> {
/// When using the format_args!() macro, this function is used to generate the /// When using the format_args!() macro, this function is used to generate the
/// Arguments structure. /// Arguments structure.
#[doc(hidden)] #[inline] #[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], pub fn new(pieces: &'a [&'a str],
args: &'a [Argument<'a>]) -> Arguments<'a> { args: &'a [Argument<'a>]) -> Arguments<'a> {
Arguments { Arguments {
@ -179,7 +179,7 @@ impl<'a> Arguments<'a> {
/// created with `argumentuint`. However, failing to do so doesn't cause /// created with `argumentuint`. However, failing to do so doesn't cause
/// unsafety, but will ignore invalid . /// unsafety, but will ignore invalid .
#[doc(hidden)] #[inline] #[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], pub fn with_placeholders(pieces: &'a [&'a str],
fmt: &'a [rt::Argument<'a>], fmt: &'a [rt::Argument<'a>],
args: &'a [Argument<'a>]) -> Arguments<'a> { args: &'a [Argument<'a>]) -> Arguments<'a> {
@ -301,7 +301,7 @@ pub trait UpperExp {
/// ///
/// * output - the buffer to write output to /// * output - the buffer to write output to
/// * args - the precompiled arguments generated by `format_args!` /// * 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"] implementation detail which should not otherwise be exported"]
pub fn write(output: &mut Writer, args: Arguments) -> Result { pub fn write(output: &mut Writer, args: Arguments) -> Result {
let mut formatter = Formatter { let mut formatter = Formatter {
@ -563,7 +563,7 @@ impl<'a> Formatter<'a> {
} }
/// Flags for formatting (packed version of rt::Flag) /// 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 } pub fn flags(&self) -> uint { self.flags }
/// Character used as 'fill' whenever there is alignment /// 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 /// 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. /// create the Argument structures that are passed into the `format` function.
#[doc(hidden)] #[inline] #[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, pub fn argument<'a, T>(f: fn(&T, &mut Formatter) -> Result,
t: &'a T) -> Argument<'a> { t: &'a T) -> Argument<'a> {
Argument::new(t, f) 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 /// 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. /// (such as for width and precision), then it invokes this method.
#[doc(hidden)] #[inline] #[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> { pub fn argumentuint<'a>(s: &'a uint) -> Argument<'a> {
Argument::from_uint(s) Argument::from_uint(s)
} }

View File

@ -14,7 +14,7 @@
//! These definitions are similar to their `ct` equivalents, but differ in that //! These definitions are similar to their `ct` equivalents, but differ in that
//! these can be statically allocated and are slightly optimized for the runtime //! 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::Alignment::*;
pub use self::Count::*; pub use self::Count::*;

View File

@ -39,7 +39,7 @@
//! guaranteed to happen in order. This is the standard mode for working //! guaranteed to happen in order. This is the standard mode for working
//! with atomic types and is equivalent to Java's `volatile`. //! with atomic types and is equivalent to Java's `volatile`.
#![experimental] #![unstable]
#![allow(missing_docs)] #![allow(missing_docs)]
#[cfg(not(stage0))] #[cfg(not(stage0))]
@ -333,7 +333,7 @@ extern "rust-intrinsic" {
/// Invokes memset on the specified pointer, setting `count * size_of::<T>()` /// Invokes memset on the specified pointer, setting `count * size_of::<T>()`
/// bytes of memory starting at `dst` to `c`. /// 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); pub fn set_memory<T>(dst: *mut T, val: u8, count: uint);
/// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with /// Equivalent to the appropriate `llvm.memcpy.p0i8.0i8.*` intrinsic, with

View File

@ -942,7 +942,7 @@ pub trait IteratorExt: Iterator + Sized {
} }
/// Use an iterator to reverse a container in place. /// 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 fn reverse_in_place<'a, T: 'a>(&mut self) where
Self: Iterator<Item=&'a mut T> + DoubleEndedIterator Self: Iterator<Item=&'a mut T> + DoubleEndedIterator
{ {
@ -974,7 +974,7 @@ pub trait DoubleEndedIterator: Iterator {
/// Calling `next()` or `next_back()` on a `RandomAccessIterator` /// Calling `next()` or `next_back()` on a `RandomAccessIterator`
/// reduces the indexable range accordingly. That is, `it.idx(1)` will become `it.idx(0)` /// reduces the indexable range accordingly. That is, `it.idx(1)` will become `it.idx(0)`
/// after `it.next()` is called. /// 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 { pub trait RandomAccessIterator: Iterator {
/// Return the number of indexable elements. At most `std::uint::MAX` /// Return the number of indexable elements. At most `std::uint::MAX`
/// elements are indexable, even if the iterator represents a longer range. /// 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() } 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 { impl<I> RandomAccessIterator for Rev<I> where I: DoubleEndedIterator + RandomAccessIterator {
#[inline] #[inline]
fn indexable(&self) -> uint { self.iter.indexable() } 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 /// 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> { pub trait AdditiveIterator<A> {
/// Iterates over the entire iterator, summing up all the elements /// Iterates over the entire iterator, summing up all the elements
/// ///
@ -1102,7 +1102,7 @@ pub trait AdditiveIterator<A> {
macro_rules! impl_additive { macro_rules! impl_additive {
($A:ty, $init:expr) => { ($A:ty, $init:expr) => {
#[experimental = "trait is experimental"] #[unstable = "trait is experimental"]
impl<T: Iterator<Item=$A>> AdditiveIterator<$A> for T { impl<T: Iterator<Item=$A>> AdditiveIterator<$A> for T {
#[inline] #[inline]
fn sum(self) -> $A { fn sum(self) -> $A {
@ -1125,7 +1125,7 @@ impl_additive! { f32, 0.0 }
impl_additive! { f64, 0.0 } impl_additive! { f64, 0.0 }
/// A trait for iterators over elements which can be multiplied together. /// 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> { pub trait MultiplicativeIterator<A> {
/// Iterates over the entire iterator, multiplying all the elements /// Iterates over the entire iterator, multiplying all the elements
/// ///
@ -1146,7 +1146,7 @@ pub trait MultiplicativeIterator<A> {
macro_rules! impl_multiplicative { macro_rules! impl_multiplicative {
($A:ty, $init:expr) => { ($A:ty, $init:expr) => {
#[experimental = "trait is experimental"] #[unstable = "trait is experimental"]
impl<T: Iterator<Item=$A>> MultiplicativeIterator<$A> for T { impl<T: Iterator<Item=$A>> MultiplicativeIterator<$A> for T {
#[inline] #[inline]
fn product(self) -> $A { 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 impl<I> RandomAccessIterator for Cycle<I> where
I: Clone + RandomAccessIterator, 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 impl<T, A, B> RandomAccessIterator for Chain<A, B> where
A: RandomAccessIterator<Item=T>, A: RandomAccessIterator<Item=T>,
B: 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 impl<T, U, A, B> RandomAccessIterator for Zip<A, B> where
A: RandomAccessIterator<Item=T>, A: RandomAccessIterator<Item=T>,
B: RandomAccessIterator<Item=U>, 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 impl<A, B, I, F> RandomAccessIterator for Map<A, B, I, F> where
I: RandomAccessIterator<Item=A>, I: RandomAccessIterator<Item=A>,
F: FnMut(A) -> B, 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 { impl<I> RandomAccessIterator for Enumerate<I> where I: RandomAccessIterator {
#[inline] #[inline]
fn indexable(&self) -> uint { 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{ impl<I> RandomAccessIterator for Skip<I> where I: RandomAccessIterator{
#[inline] #[inline]
fn indexable(&self) -> uint { 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{ impl<I> RandomAccessIterator for Take<I> where I: RandomAccessIterator{
#[inline] #[inline]
fn indexable(&self) -> uint { 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 // 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 { impl<I> RandomAccessIterator for Fuse<I> where I: RandomAccessIterator {
#[inline] #[inline]
fn indexable(&self) -> uint { 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 /// 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. /// call the underlying iterator again even if it previously returned None.
#[inline] #[inline]
#[experimental = "seems marginal"] #[unstable = "seems marginal"]
pub fn reset_fuse(&mut self) { pub fn reset_fuse(&mut self) {
self.done = false 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 impl<A, I, F> RandomAccessIterator for Inspect<A, I, F> where
I: RandomAccessIterator<Item=A>, I: RandomAccessIterator<Item=A>,
F: FnMut(&A), F: FnMut(&A),
@ -2364,7 +2364,7 @@ impl<A, I, F> RandomAccessIterator for Inspect<A, I, F> where
/// println!("{}", i); /// println!("{}", i);
/// } /// }
/// ``` /// ```
#[experimental] #[unstable]
pub struct Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> { pub struct Unfold<A, St, F> where F: FnMut(&mut St) -> Option<A> {
f: F, f: F,
/// Internal state that will be passed to the closure on the next iteration /// 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> { 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 /// Creates a new iterator with the specified closure as the "iterator
/// function" and an initial state to eventually pass to the closure /// 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) } 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> { impl<A: Clone> RandomAccessIterator for Repeat<A> {
#[inline] #[inline]
fn indexable(&self) -> uint { uint::MAX } 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 /// An iterator that repeatedly applies a given function, starting
/// from a given seed value. /// from a given seed value.
#[experimental] #[unstable]
pub type Iterate<T, F> = Unfold<T, IterateState<T, F>, fn(&mut IterateState<T, F>) -> Option<T>>; 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 /// Create a new iterator that produces an infinite sequence of
/// repeated applications of the given function `f`. /// repeated applications of the given function `f`.
#[experimental] #[unstable]
pub fn iterate<T, F>(seed: T, f: F) -> Iterate<T, F> where pub fn iterate<T, F>(seed: T, f: F) -> Iterate<T, F> where
T: Clone, T: Clone,
F: FnMut(T) -> T, F: FnMut(T) -> T,

View File

@ -48,7 +48,7 @@
// separate crate, libcoretest, to avoid bizarre issues. // separate crate, libcoretest, to avoid bizarre issues.
#![crate_name = "core"] #![crate_name = "core"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -32,7 +32,7 @@ unsafe impl Zeroable for u64 {}
/// NULL or 0 that might allow certain optimizations. /// NULL or 0 that might allow certain optimizations.
#[lang="non_zero"] #[lang="non_zero"]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Show)]
#[experimental] #[unstable]
pub struct NonZero<T: Zeroable>(T); pub struct NonZero<T: Zeroable>(T);
impl<T: Zeroable> NonZero<T> { impl<T: Zeroable> NonZero<T> {

View File

@ -726,7 +726,7 @@ impl UnsignedInt for u32 {}
impl UnsignedInt for u64 {} impl UnsignedInt for u64 {}
/// A generic trait for converting a value to a number. /// 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 { pub trait ToPrimitive {
/// Converts the value of `self` to an `int`. /// Converts the value of `self` to an `int`.
#[inline] #[inline]
@ -991,7 +991,7 @@ impl_to_primitive_float! { f32 }
impl_to_primitive_float! { f64 } impl_to_primitive_float! { f64 }
/// A generic trait for converting a number to a value. /// 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 { pub trait FromPrimitive : ::marker::Sized {
/// Convert an `int` to return an optional value of this type. If the /// Convert an `int` to return an optional value of this type. If the
/// value cannot be represented by this value, the `None` is returned. /// 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`. /// 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> { pub fn from_int<A: FromPrimitive>(n: int) -> Option<A> {
FromPrimitive::from_int(n) FromPrimitive::from_int(n)
} }
/// A utility function that just calls `FromPrimitive::from_i8`. /// 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> { pub fn from_i8<A: FromPrimitive>(n: i8) -> Option<A> {
FromPrimitive::from_i8(n) FromPrimitive::from_i8(n)
} }
/// A utility function that just calls `FromPrimitive::from_i16`. /// 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> { pub fn from_i16<A: FromPrimitive>(n: i16) -> Option<A> {
FromPrimitive::from_i16(n) FromPrimitive::from_i16(n)
} }
/// A utility function that just calls `FromPrimitive::from_i32`. /// 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> { pub fn from_i32<A: FromPrimitive>(n: i32) -> Option<A> {
FromPrimitive::from_i32(n) FromPrimitive::from_i32(n)
} }
/// A utility function that just calls `FromPrimitive::from_i64`. /// 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> { pub fn from_i64<A: FromPrimitive>(n: i64) -> Option<A> {
FromPrimitive::from_i64(n) FromPrimitive::from_i64(n)
} }
/// A utility function that just calls `FromPrimitive::from_uint`. /// 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> { pub fn from_uint<A: FromPrimitive>(n: uint) -> Option<A> {
FromPrimitive::from_uint(n) FromPrimitive::from_uint(n)
} }
/// A utility function that just calls `FromPrimitive::from_u8`. /// 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> { pub fn from_u8<A: FromPrimitive>(n: u8) -> Option<A> {
FromPrimitive::from_u8(n) FromPrimitive::from_u8(n)
} }
/// A utility function that just calls `FromPrimitive::from_u16`. /// 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> { pub fn from_u16<A: FromPrimitive>(n: u16) -> Option<A> {
FromPrimitive::from_u16(n) FromPrimitive::from_u16(n)
} }
/// A utility function that just calls `FromPrimitive::from_u32`. /// 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> { pub fn from_u32<A: FromPrimitive>(n: u32) -> Option<A> {
FromPrimitive::from_u32(n) FromPrimitive::from_u32(n)
} }
/// A utility function that just calls `FromPrimitive::from_u64`. /// 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> { pub fn from_u64<A: FromPrimitive>(n: u64) -> Option<A> {
FromPrimitive::from_u64(n) FromPrimitive::from_u64(n)
} }
/// A utility function that just calls `FromPrimitive::from_f32`. /// 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> { pub fn from_f32<A: FromPrimitive>(n: f32) -> Option<A> {
FromPrimitive::from_f32(n) FromPrimitive::from_f32(n)
} }
/// A utility function that just calls `FromPrimitive::from_f64`. /// 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> { pub fn from_f64<A: FromPrimitive>(n: f64) -> Option<A> {
FromPrimitive::from_f64(n) FromPrimitive::from_f64(n)
} }
@ -1190,13 +1190,13 @@ impl_from_primitive! { f64, to_f64 }
/// ``` /// ```
/// ///
#[inline] #[inline]
#[experimental = "likely to be removed"] #[unstable = "likely to be removed"]
pub fn cast<T: NumCast,U: NumCast>(n: T) -> Option<U> { pub fn cast<T: NumCast,U: NumCast>(n: T) -> Option<U> {
NumCast::from(n) NumCast::from(n)
} }
/// An interface for casting between machine scalars. /// 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 { pub trait NumCast: ToPrimitive {
/// Creates a number from another value that can be converted into a primitive via the /// Creates a number from another value that can be converted into a primitive via the
/// `ToPrimitive` trait. /// `ToPrimitive` trait.
@ -1394,20 +1394,20 @@ pub trait Float
} }
/// A generic trait for converting a string with a radix (base) to a value /// 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 { pub trait FromStrRadix {
fn from_str_radix(str: &str, radix: uint) -> Option<Self>; fn from_str_radix(str: &str, radix: uint) -> Option<Self>;
} }
/// A utility function that just calls FromStrRadix::from_str_radix. /// 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> { pub fn from_str_radix<T: FromStrRadix>(str: &str, radix: uint) -> Option<T> {
FromStrRadix::from_str_radix(str, radix) FromStrRadix::from_str_radix(str, radix)
} }
macro_rules! from_str_radix_float_impl { macro_rules! from_str_radix_float_impl {
($T:ty) => { ($T:ty) => {
#[experimental = "might need to return Result"] #[unstable = "might need to return Result"]
impl FromStr for $T { impl FromStr for $T {
/// Convert a string in base 10 to a float. /// Convert a string in base 10 to a float.
/// Accepts an optional decimal exponent. /// 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 { impl FromStrRadix for $T {
/// Convert a string in a given base to a float. /// 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 { macro_rules! from_str_radix_int_impl {
($T:ty) => { ($T:ty) => {
#[experimental = "might need to return Result"] #[unstable = "might need to return Result"]
impl FromStr for $T { impl FromStr for $T {
#[inline] #[inline]
fn from_str(src: &str) -> Option<$T> { 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 { impl FromStrRadix for $T {
fn from_str_radix(src: &str, radix: uint) -> Option<$T> { fn from_str_radix(src: &str, radix: uint) -> Option<$T> {
assert!(radix >= 2 && radix <= 36, assert!(radix >= 2 && radix <= 36,

View File

@ -477,7 +477,7 @@ impl<T> Option<T> {
/// assert_eq!(x.ok_or(0i), Err(0i)); /// assert_eq!(x.ok_or(0i), Err(0i));
/// ``` /// ```
#[inline] #[inline]
#[experimental] #[unstable]
pub fn ok_or<E>(self, err: E) -> Result<T, E> { pub fn ok_or<E>(self, err: E) -> Result<T, E> {
match self { match self {
Some(v) => Ok(v), Some(v) => Ok(v),
@ -498,7 +498,7 @@ impl<T> Option<T> {
/// assert_eq!(x.ok_or_else(|| 0i), Err(0i)); /// assert_eq!(x.ok_or_else(|| 0i), Err(0i));
/// ``` /// ```
#[inline] #[inline]
#[experimental] #[unstable]
pub fn ok_or_else<E, F: FnOnce() -> E>(self, err: F) -> Result<T, E> { pub fn ok_or_else<E, F: FnOnce() -> E>(self, err: F) -> Result<T, E> {
match self { match self {
Some(v) => Ok(v), Some(v) => Ok(v),

View File

@ -106,7 +106,7 @@ pub use intrinsics::copy_nonoverlapping_memory;
#[unstable] #[unstable]
pub use intrinsics::copy_memory; pub use intrinsics::copy_memory;
#[experimental = "uncertain about naming and semantics"] #[unstable = "uncertain about naming and semantics"]
pub use intrinsics::set_memory; pub use intrinsics::set_memory;

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
#![allow(missing_docs)] #![allow(missing_docs)]
#![experimental] #![unstable]
//! Contains struct definitions for the layout of compiler built-in types. //! Contains struct definitions for the layout of compiler built-in types.
//! //!

View File

@ -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. /// If an `Err` is encountered, it is immediately returned.
/// Otherwise, the folded value is returned. /// Otherwise, the folded value is returned.
#[inline] #[inline]
#[experimental] #[unstable]
pub fn fold<T, pub fn fold<T,
V, V,
E, E,

View File

@ -19,7 +19,7 @@
//! provided beyond this module. //! provided beyond this module.
//! //!
//! ```rust //! ```rust
//! #[allow(experimental)]; //! #[allow(unstable)];
//! //!
//! fn main() { //! fn main() {
//! use std::simd::f32x4; //! use std::simd::f32x4;
@ -37,7 +37,7 @@
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
#![allow(missing_docs)] #![allow(missing_docs)]
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[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,
pub i8, pub i8, pub i8, pub i8); pub i8, pub i8, pub i8, pub i8);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]
pub struct i16x8(pub i16, pub i16, pub i16, pub i16, pub struct i16x8(pub i16, pub i16, pub i16, pub i16,
pub i16, pub i16, pub i16, pub i16); pub i16, pub i16, pub i16, pub i16);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]
pub struct i32x4(pub i32, pub i32, pub i32, pub i32); pub struct i32x4(pub i32, pub i32, pub i32, pub i32);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]
pub struct i64x2(pub i64, pub i64); pub struct i64x2(pub i64, pub i64);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[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,
pub u8, pub u8, pub u8, pub u8); pub u8, pub u8, pub u8, pub u8);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]
pub struct u16x8(pub u16, pub u16, pub u16, pub u16, pub struct u16x8(pub u16, pub u16, pub u16, pub u16,
pub u16, pub u16, pub u16, pub u16); pub u16, pub u16, pub u16, pub u16);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]
pub struct u32x4(pub u32, pub u32, pub u32, pub u32); pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]
pub struct u64x2(pub u64, pub u64); pub struct u64x2(pub u64, pub u64);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]
pub struct f32x4(pub f32, pub f32, pub f32, pub f32); pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
#[experimental] #[unstable]
#[simd] #[simd]
#[derive(Copy, Show)] #[derive(Copy, Show)]
#[repr(C)] #[repr(C)]

View File

@ -457,7 +457,7 @@ impl<T> SliceExt for [T] {
self.binary_search_by(|p| p.cmp(x)) self.binary_search_by(|p| p.cmp(x))
} }
#[experimental] #[unstable]
fn next_permutation(&mut self) -> bool where T: Ord { fn next_permutation(&mut self) -> bool where T: Ord {
// These cases only have 1 permutation each, so we can't do anything. // These cases only have 1 permutation each, so we can't do anything.
if self.len() < 2 { return false; } if self.len() < 2 { return false; }
@ -488,7 +488,7 @@ impl<T> SliceExt for [T] {
true true
} }
#[experimental] #[unstable]
fn prev_permutation(&mut self) -> bool where T: Ord { fn prev_permutation(&mut self) -> bool where T: Ord {
// These cases only have 1 permutation each, so we can't do anything. // These cases only have 1 permutation each, so we can't do anything.
if self.len() < 2 { return false; } 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. /// 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> { pub trait AsSlice<T> {
/// Work with `self` as a slice. /// Work with `self` as a slice.
fn as_slice<'a>(&'a self) -> &'a [T]; fn as_slice<'a>(&'a self) -> &'a [T];
} }
#[experimental = "trait is experimental"] #[unstable = "trait is experimental"]
impl<T> AsSlice<T> for [T] { impl<T> AsSlice<T> for [T] {
#[inline(always)] #[inline(always)]
fn as_slice<'a>(&'a self) -> &'a [T] { self } 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 { impl<'a, T, U: ?Sized + AsSlice<T>> AsSlice<T> for &'a U {
#[inline(always)] #[inline(always)]
fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } 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 { impl<'a, T, U: ?Sized + AsSlice<T>> AsSlice<T> for &'a mut U {
#[inline(always)] #[inline(always)]
fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) } fn as_slice(&self) -> &[T] { AsSlice::as_slice(*self) }
@ -754,7 +754,7 @@ pub struct Iter<'a, T: 'a> {
marker: marker::ContravariantLifetime<'a> marker: marker::ContravariantLifetime<'a>
} }
#[experimental] #[unstable]
impl<'a, T> ops::Index<ops::Range<uint>> for Iter<'a, T> { impl<'a, T> ops::Index<ops::Range<uint>> for Iter<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[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> { impl<'a, T> ops::Index<ops::RangeTo<uint>> for Iter<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[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> { impl<'a, T> ops::Index<ops::RangeFrom<uint>> for Iter<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[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> { impl<'a, T> ops::Index<ops::FullRange> for Iter<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[inline]
@ -795,7 +795,7 @@ impl<'a, T> Iter<'a, T> {
/// ///
/// This has the same lifetime as the original slice, and so the /// This has the same lifetime as the original slice, and so the
/// iterator can continue to be used while this exists. /// iterator can continue to be used while this exists.
#[experimental] #[unstable]
pub fn as_slice(&self) -> &'a [T] { pub fn as_slice(&self) -> &'a [T] {
make_slice!(T => &'a [T]: self.ptr, self.end) 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 } fn clone(&self) -> Iter<'a, T> { *self }
} }
#[experimental = "trait is experimental"] #[unstable = "trait is experimental"]
impl<'a, T> RandomAccessIterator for Iter<'a, T> { impl<'a, T> RandomAccessIterator for Iter<'a, T> {
#[inline] #[inline]
fn indexable(&self) -> uint { 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> { impl<'a, T> ops::Index<ops::Range<uint>> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[inline]
@ -855,7 +855,7 @@ impl<'a, T> ops::Index<ops::Range<uint>> for IterMut<'a, T> {
self.index(&ops::FullRange).index(index) self.index(&ops::FullRange).index(index)
} }
} }
#[experimental] #[unstable]
impl<'a, T> ops::Index<ops::RangeTo<uint>> for IterMut<'a, T> { impl<'a, T> ops::Index<ops::RangeTo<uint>> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[inline]
@ -863,7 +863,7 @@ impl<'a, T> ops::Index<ops::RangeTo<uint>> for IterMut<'a, T> {
self.index(&ops::FullRange).index(index) self.index(&ops::FullRange).index(index)
} }
} }
#[experimental] #[unstable]
impl<'a, T> ops::Index<ops::RangeFrom<uint>> for IterMut<'a, T> { impl<'a, T> ops::Index<ops::RangeFrom<uint>> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[inline]
@ -871,7 +871,7 @@ impl<'a, T> ops::Index<ops::RangeFrom<uint>> for IterMut<'a, T> {
self.index(&ops::FullRange).index(index) self.index(&ops::FullRange).index(index)
} }
} }
#[experimental] #[unstable]
impl<'a, T> ops::Index<ops::FullRange> for IterMut<'a, T> { impl<'a, T> ops::Index<ops::FullRange> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[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> { impl<'a, T> ops::IndexMut<ops::Range<uint>> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[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) self.index_mut(&ops::FullRange).index_mut(index)
} }
} }
#[experimental] #[unstable]
impl<'a, T> ops::IndexMut<ops::RangeTo<uint>> for IterMut<'a, T> { impl<'a, T> ops::IndexMut<ops::RangeTo<uint>> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[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) self.index_mut(&ops::FullRange).index_mut(index)
} }
} }
#[experimental] #[unstable]
impl<'a, T> ops::IndexMut<ops::RangeFrom<uint>> for IterMut<'a, T> { impl<'a, T> ops::IndexMut<ops::RangeFrom<uint>> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[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) self.index_mut(&ops::FullRange).index_mut(index)
} }
} }
#[experimental] #[unstable]
impl<'a, T> ops::IndexMut<ops::FullRange> for IterMut<'a, T> { impl<'a, T> ops::IndexMut<ops::FullRange> for IterMut<'a, T> {
type Output = [T]; type Output = [T];
#[inline] #[inline]
@ -921,7 +921,7 @@ impl<'a, T> IterMut<'a, T> {
/// to consume the iterator. Consider using the `Slice` and /// to consume the iterator. Consider using the `Slice` and
/// `SliceMut` implementations for obtaining slices with more /// `SliceMut` implementations for obtaining slices with more
/// restricted lifetimes that do not consume the iterator. /// restricted lifetimes that do not consume the iterator.
#[experimental] #[unstable]
pub fn into_slice(self) -> &'a mut [T] { pub fn into_slice(self) -> &'a mut [T] {
make_slice!(T => &'a mut [T]: self.ptr, self.end) 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> { impl<'a, T> RandomAccessIterator for Chunks<'a, T> {
#[inline] #[inline]
fn indexable(&self) -> uint { 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]`. /// Operations on `[u8]`.
#[experimental = "needs review"] #[unstable = "needs review"]
pub mod bytes { pub mod bytes {
use ptr; use ptr;
use slice::SliceExt; use slice::SliceExt;
@ -1430,7 +1430,7 @@ pub mod bytes {
impl MutableByteVector for [u8] { impl MutableByteVector for [u8] {
#[inline] #[inline]
#[allow(experimental)] #[allow(unstable)]
fn set_memory(&mut self, value: u8) { fn set_memory(&mut self, value: u8) {
unsafe { ptr::set_memory(self.as_mut_ptr(), value, self.len()) }; 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. /// Extension methods for slices containing integers.
#[experimental] #[unstable]
pub trait IntSliceExt<U, S> { pub trait IntSliceExt<U, S> {
/// Converts the slice to an immutable slice of unsigned integers with the same width. /// Converts the slice to an immutable slice of unsigned integers with the same width.
fn as_unsigned<'a>(&'a self) -> &'a [U]; fn as_unsigned<'a>(&'a self) -> &'a [U];
@ -1521,7 +1521,7 @@ pub trait IntSliceExt<U, S> {
macro_rules! impl_int_slice { macro_rules! impl_int_slice {
($u:ty, $s:ty, $t:ty) => { ($u:ty, $s:ty, $t:ty) => {
#[experimental] #[unstable]
impl IntSliceExt<$u, $s> for [$t] { impl IntSliceExt<$u, $s> for [$t] {
#[inline] #[inline]
fn as_unsigned(&self) -> &[$u] { unsafe { transmute(self) } } fn as_unsigned(&self) -> &[$u] { unsafe { transmute(self) } }

View File

@ -114,7 +114,7 @@ fn discard_doesnt_unborrow() {
} }
#[test] #[test]
#[allow(experimental)] #[allow(unstable)]
fn clone_ref_updates_flag() { fn clone_ref_updates_flag() {
let x = RefCell::new(0i); let x = RefCell::new(0i);
{ {

View File

@ -15,7 +15,7 @@
//! [mz]: https://code.google.com/p/miniz/ //! [mz]: https://code.google.com/p/miniz/
#![crate_name = "flate"] #![crate_name = "flate"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -15,7 +15,7 @@
//! generated instead. //! generated instead.
#![crate_name = "fmt_macros"] #![crate_name = "fmt_macros"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -78,7 +78,7 @@
//! ``` //! ```
#![crate_name = "getopts"] #![crate_name = "getopts"]
#![experimental = "use the crates.io `getopts` library instead"] #![unstable = "use the crates.io `getopts` library instead"]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -265,7 +265,7 @@
//! * [DOT language](http://www.graphviz.org/doc/info/lang.html) //! * [DOT language](http://www.graphviz.org/doc/info/lang.html)
#![crate_name = "graphviz"] #![crate_name = "graphviz"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -10,7 +10,7 @@
#![crate_name = "libc"] #![crate_name = "libc"]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![cfg_attr(not(feature = "cargo-build"), experimental)] #![cfg_attr(not(feature = "cargo-build"), unstable)]
#![cfg_attr(not(feature = "cargo-build"), staged_api)] #![cfg_attr(not(feature = "cargo-build"), staged_api)]
#![no_std] #![no_std]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -156,7 +156,7 @@
//! if logging is disabled, none of the components of the log will be executed. //! if logging is disabled, none of the components of the log will be executed.
#![crate_name = "log"] #![crate_name = "log"]
#![experimental = "use the crates.io `log` library instead"] #![unstable = "use the crates.io `log` library instead"]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -17,7 +17,7 @@
//! internally. The `IndependentSample` trait is for generating values //! internally. The `IndependentSample` trait is for generating values
//! that do not need to record state. //! that do not need to record state.
#![experimental] #![unstable]
use core::prelude::*; use core::prelude::*;
use core::num::{Float, Int}; use core::num::{Float, Int};

View File

@ -24,7 +24,7 @@
html_playground_url = "http://play.rust-lang.org/")] html_playground_url = "http://play.rust-lang.org/")]
#![no_std] #![no_std]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#[macro_use] #[macro_use]

View File

@ -16,7 +16,7 @@
//! http://www.matroska.org/technical/specs/rfc/index.html //! http://www.matroska.org/technical/specs/rfc/index.html
#![crate_name = "rbml"] #![crate_name = "rbml"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -16,7 +16,7 @@
#![crate_name = "regex"] #![crate_name = "regex"]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![experimental = "use the crates.io `regex` library instead"] #![unstable = "use the crates.io `regex` library instead"]
#![staged_api] #![staged_api]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_favicon_url = "http://www.rust-lang.org/favicon.ico",

View File

@ -255,7 +255,7 @@ impl Regex {
} }
#[doc(hidden)] #[doc(hidden)]
#[experimental] #[unstable]
pub fn names_iter<'a>(&'a self) -> NamesIter<'a> { pub fn names_iter<'a>(&'a self) -> NamesIter<'a> {
match *self { match *self {
Native(ref n) => NamesIterNative(n.names.iter()), Native(ref n) => NamesIterNative(n.names.iter()),
@ -410,7 +410,7 @@ pub struct Captures<'t> {
} }
impl<'t> Captures<'t> { impl<'t> Captures<'t> {
#[allow(experimental)] #[allow(unstable)]
fn new(re: &Regex, search: &'t str, locs: CaptureLocs) fn new(re: &Regex, search: &'t str, locs: CaptureLocs)
-> Option<Captures<'t>> { -> Option<Captures<'t>> {
if !has_match(&locs) { if !has_match(&locs) {

View File

@ -15,7 +15,7 @@
//! This API is completely unstable and subject to change. //! This API is completely unstable and subject to change.
#![crate_name = "rustc"] #![crate_name = "rustc"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -1630,36 +1630,29 @@ declare_lint! {
Warn, Warn,
"detects use of #[deprecated] items" "detects use of #[deprecated] items"
} }
// FIXME #6875: Change to Warn after std library stabilization is complete
declare_lint! {
EXPERIMENTAL,
Allow,
"detects use of #[experimental] items"
}
declare_lint! { declare_lint! {
UNSTABLE, UNSTABLE,
Allow, Warn,
"detects use of #[unstable] items (incl. items with no stability attribute)" "detects use of #[unstable] items (incl. items with no stability attribute)"
} }
declare_lint!(STAGED_EXPERIMENTAL, Warn, /// Checks for use of items with `#[deprecated]`, `#[unstable]` and
"detects use of #[experimental] items in staged builds");
declare_lint!(STAGED_UNSTABLE, Warn,
"detects use of #[unstable] items (incl. items with no stability attribute) \
in staged builds");
/// Checks for use of items with `#[deprecated]`, `#[experimental]` and
/// `#[unstable]` attributes, or no stability attribute. /// `#[unstable]` attributes, or no stability attribute.
#[derive(Copy)] #[derive(Copy)]
pub struct Stability; pub struct Stability { this_crate_staged: bool }
impl Stability { impl Stability {
pub fn new() -> Stability { Stability { this_crate_staged: false } }
fn lint(&self, cx: &Context, id: ast::DefId, span: Span) { fn lint(&self, cx: &Context, id: ast::DefId, span: Span) {
let ref stability = stability::lookup(cx.tcx, id); let ref stability = stability::lookup(cx.tcx, id);
let cross_crate = !ast_util::is_local(id); let cross_crate = !ast_util::is_local(id);
let staged = (!cross_crate && self.this_crate_staged)
|| (cross_crate && stability::is_staged_api(cx.tcx, id));
if !staged { return }
// stability attributes are promises made across crates; only // stability attributes are promises made across crates; only
// check DEPRECATED for crate-local usage. // check DEPRECATED for crate-local usage.
@ -1668,21 +1661,12 @@ impl Stability {
None if cross_crate => (UNSTABLE, "unmarked"), None if cross_crate => (UNSTABLE, "unmarked"),
Some(attr::Stability { level: attr::Unstable, .. }) if cross_crate => Some(attr::Stability { level: attr::Unstable, .. }) if cross_crate =>
(UNSTABLE, "unstable"), (UNSTABLE, "unstable"),
Some(attr::Stability { level: attr::Experimental, .. }) if cross_crate =>
(EXPERIMENTAL, "experimental"),
Some(attr::Stability { level: attr::Deprecated, .. }) => Some(attr::Stability { level: attr::Deprecated, .. }) =>
(DEPRECATED, "deprecated"), (DEPRECATED, "deprecated"),
_ => return _ => return
}; };
output(cx, span, stability, lint, label); output(cx, span, stability, lint, label);
if cross_crate && stability::is_staged_api(cx.tcx, id) {
if lint.name == UNSTABLE.name {
output(cx, span, stability, STAGED_UNSTABLE, label);
} else if lint.name == EXPERIMENTAL.name {
output(cx, span, stability, STAGED_EXPERIMENTAL, label);
}
}
fn output(cx: &Context, span: Span, stability: &Option<attr::Stability>, fn output(cx: &Context, span: Span, stability: &Option<attr::Stability>,
lint: &'static Lint, label: &'static str) { lint: &'static Lint, label: &'static str) {
@ -1706,7 +1690,7 @@ impl Stability {
impl LintPass for Stability { impl LintPass for Stability {
fn get_lints(&self) -> LintArray { fn get_lints(&self) -> LintArray {
lint_array!(DEPRECATED, EXPERIMENTAL, UNSTABLE, STAGED_EXPERIMENTAL, STAGED_UNSTABLE) lint_array!(DEPRECATED, UNSTABLE)
} }
fn check_crate(&mut self, _: &Context, c: &ast::Crate) { fn check_crate(&mut self, _: &Context, c: &ast::Crate) {
@ -1717,6 +1701,7 @@ impl LintPass for Stability {
match attr.node.value.node { match attr.node.value.node {
ast::MetaWord(_) => { ast::MetaWord(_) => {
attr::mark_used(attr); attr::mark_used(attr);
self.this_crate_staged = true;
} }
_ => (/*pass*/) _ => (/*pass*/)
} }

View File

@ -209,7 +209,6 @@ impl LintStore {
UnsafeBlocks, UnsafeBlocks,
UnusedMut, UnusedMut,
UnusedAllocation, UnusedAllocation,
Stability,
MissingCopyImplementations, MissingCopyImplementations,
UnstableFeatures, UnstableFeatures,
); );
@ -218,6 +217,7 @@ impl LintStore {
TypeLimits, TypeLimits,
RawPointerDerive, RawPointerDerive,
MissingDoc, MissingDoc,
Stability,
); );
add_lint_group!(sess, "bad_style", add_lint_group!(sess, "bad_style",
@ -308,18 +308,21 @@ impl LintStore {
UnstableFeatures::Cheat => Allow UnstableFeatures::Cheat => Allow
}; };
match self.by_name.get("unstable_features") { match self.by_name.get("unstable_features") {
Some(&Id(lint_id)) => self.set_level(lint_id, (lvl, ReleaseChannel)), Some(&Id(lint_id)) => if self.get_level_source(lint_id).0 != Forbid {
Some(&Renamed(_, lint_id)) => self.set_level(lint_id, (lvl, ReleaseChannel)), self.set_level(lint_id, (lvl, ReleaseChannel))
},
Some(&Renamed(_, lint_id)) => if self.get_level_source(lint_id).0 != Forbid {
self.set_level(lint_id, (lvl, ReleaseChannel))
},
None => unreachable!() None => unreachable!()
} }
match self.by_name.get("staged_unstable") { match self.by_name.get("unstable") {
Some(&Id(lint_id)) => self.set_level(lint_id, (lvl, ReleaseChannel)), Some(&Id(lint_id)) => if self.get_level_source(lint_id).0 != Forbid {
Some(&Renamed(_, lint_id)) => self.set_level(lint_id, (lvl, ReleaseChannel)), self.set_level(lint_id, (lvl, ReleaseChannel))
None => unreachable!() },
} Some(&Renamed(_, lint_id)) => if self.get_level_source(lint_id).0 != Forbid {
match self.by_name.get("staged_experimental") { self.set_level(lint_id, (lvl, ReleaseChannel))
Some(&Id(lint_id)) => self.set_level(lint_id, (lvl, ReleaseChannel)), },
Some(&Renamed(_, lint_id)) => self.set_level(lint_id, (lvl, ReleaseChannel)),
None => unreachable!() None => unreachable!()
} }
} }

View File

@ -40,7 +40,7 @@ use syntax::ast;
pub use lint::context::{Context, LintStore, raw_emit_lint, check_crate, gather_attrs}; pub use lint::context::{Context, LintStore, raw_emit_lint, check_crate, gather_attrs};
/// Specification of a single lint. /// Specification of a single lint.
#[derive(Copy)] #[derive(Copy, Show)]
pub struct Lint { pub struct Lint {
/// A string identifier for the lint. /// A string identifier for the lint.
/// ///
@ -208,7 +208,7 @@ impl LintId {
} }
/// Setting for how to handle a lint. /// Setting for how to handle a lint.
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord)] #[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Show)]
pub enum Level { pub enum Level {
Allow, Warn, Deny, Forbid Allow, Warn, Deny, Forbid
} }

View File

@ -22,7 +22,7 @@
//! build speedups. //! build speedups.
#![crate_name = "rustc_back"] #![crate_name = "rustc_back"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
#![crate_name = "rustc_borrowck"] #![crate_name = "rustc_borrowck"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -15,7 +15,7 @@
//! This API is completely unstable and subject to change. //! This API is completely unstable and subject to change.
#![crate_name = "rustc_driver"] #![crate_name = "rustc_driver"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -14,7 +14,7 @@
#![allow(dead_code)] #![allow(dead_code)]
#![crate_name = "rustc_llvm"] #![crate_name = "rustc_llvm"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
#![crate_name = "rustc_resolve"] #![crate_name = "rustc_resolve"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -15,7 +15,7 @@
//! This API is completely unstable and subject to change. //! This API is completely unstable and subject to change.
#![crate_name = "rustc_trans"] #![crate_name = "rustc_trans"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -64,7 +64,7 @@ This API is completely unstable and subject to change.
*/ */
#![crate_name = "rustc_typeck"] #![crate_name = "rustc_typeck"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
#![crate_name = "rustdoc"] #![crate_name = "rustdoc"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -22,7 +22,7 @@ use string::String;
use vec::Vec; use vec::Vec;
/// Extension methods for ASCII-subset only operations on owned strings /// Extension methods for ASCII-subset only operations on owned strings
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
pub trait OwnedAsciiExt { pub trait OwnedAsciiExt {
/// Convert the string to ASCII upper case: /// Convert the string to ASCII upper case:
/// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z', /// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
@ -36,7 +36,7 @@ pub trait OwnedAsciiExt {
} }
/// Extension methods for ASCII-subset only operations on string slices /// Extension methods for ASCII-subset only operations on string slices
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
pub trait AsciiExt<T = Self> { pub trait AsciiExt<T = Self> {
/// Check if within the ASCII range. /// Check if within the ASCII range.
fn is_ascii(&self) -> bool; fn is_ascii(&self) -> bool;
@ -57,7 +57,7 @@ pub trait AsciiExt<T = Self> {
fn eq_ignore_ascii_case(&self, other: &Self) -> bool; fn eq_ignore_ascii_case(&self, other: &Self) -> bool;
} }
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
impl AsciiExt<String> for str { impl AsciiExt<String> for str {
#[inline] #[inline]
fn is_ascii(&self) -> bool { fn is_ascii(&self) -> bool {
@ -82,7 +82,7 @@ impl AsciiExt<String> for str {
} }
} }
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
impl OwnedAsciiExt for String { impl OwnedAsciiExt for String {
#[inline] #[inline]
fn into_ascii_uppercase(self) -> String { fn into_ascii_uppercase(self) -> String {
@ -97,7 +97,7 @@ impl OwnedAsciiExt for String {
} }
} }
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
impl AsciiExt<Vec<u8>> for [u8] { impl AsciiExt<Vec<u8>> for [u8] {
#[inline] #[inline]
fn is_ascii(&self) -> bool { fn is_ascii(&self) -> bool {
@ -123,7 +123,7 @@ impl AsciiExt<Vec<u8>> for [u8] {
} }
} }
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
impl OwnedAsciiExt for Vec<u8> { impl OwnedAsciiExt for Vec<u8> {
#[inline] #[inline]
fn into_ascii_uppercase(mut self) -> Vec<u8> { fn into_ascii_uppercase(mut self) -> Vec<u8> {
@ -142,7 +142,7 @@ impl OwnedAsciiExt for Vec<u8> {
} }
} }
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
impl AsciiExt for u8 { impl AsciiExt for u8 {
#[inline] #[inline]
fn is_ascii(&self) -> bool { fn is_ascii(&self) -> bool {
@ -165,7 +165,7 @@ impl AsciiExt for u8 {
} }
} }
#[experimental = "would prefer to do this in a more general way"] #[unstable = "would prefer to do this in a more general way"]
impl AsciiExt for char { impl AsciiExt for char {
#[inline] #[inline]
fn is_ascii(&self) -> bool { fn is_ascii(&self) -> bool {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![experimental] #![unstable]
//! A typesafe bitmask flag generator. //! A typesafe bitmask flag generator.

View File

@ -632,7 +632,7 @@ impl<K, V> RawTable<K, V> {
/// Creates a new raw table from a given capacity. All buckets are /// Creates a new raw table from a given capacity. All buckets are
/// initially empty. /// initially empty.
#[allow(experimental)] #[allow(unstable)]
pub fn new(capacity: uint) -> RawTable<K, V> { pub fn new(capacity: uint) -> RawTable<K, V> {
unsafe { unsafe {
let ret = RawTable::new_uninitialized(capacity); let ret = RawTable::new_uninitialized(capacity);

View File

@ -12,7 +12,7 @@
//! //!
//! A simple wrapper over the platform's dynamic library facilities //! A simple wrapper over the platform's dynamic library facilities
#![experimental] #![unstable]
#![allow(missing_docs)] #![allow(missing_docs)]
use prelude::v1::*; use prelude::v1::*;

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![experimental] #![unstable]
use prelude::v1::*; use prelude::v1::*;

View File

@ -410,7 +410,7 @@
//! them with the same character. For example, the `{` character is escaped with //! them with the same character. For example, the `{` character is escaped with
//! `{{` and the `}` character is escaped with `}}`. //! `{{` and the `}` character is escaped with `}}`.
#![experimental] #![unstable]
use string; use string;
@ -439,7 +439,7 @@ pub use core::fmt::{argument, argumentuint};
/// let s = fmt::format(format_args!("Hello, {}!", "world")); /// let s = fmt::format(format_args!("Hello, {}!", "world"));
/// assert_eq!(s, "Hello, world!".to_string()); /// assert_eq!(s, "Hello, world!".to_string());
/// ``` /// ```
#[experimental = "this is an implementation detail of format! and should not \ #[unstable = "this is an implementation detail of format! and should not \
be called directly"] be called directly"]
pub fn format(args: Arguments) -> string::String { pub fn format(args: Arguments) -> string::String {
let mut output = string::String::new(); let mut output = string::String::new();

View File

@ -219,7 +219,7 @@
//! concerned with error handling; instead its caller is responsible for //! concerned with error handling; instead its caller is responsible for
//! responding to errors that may occur while attempting to read the numbers. //! responding to errors that may occur while attempting to read the numbers.
#![experimental] #![unstable]
#![deny(unused_must_use)] #![deny(unused_must_use)]
pub use self::SeekStyle::*; pub use self::SeekStyle::*;

View File

@ -68,7 +68,7 @@ impl UnixStream {
/// ///
/// If a `timeout` with zero or negative duration is specified then /// If a `timeout` with zero or negative duration is specified then
/// the function returns `Err`, with the error kind set to `TimedOut`. /// the function returns `Err`, with the error kind set to `TimedOut`.
#[experimental = "the timeout argument is likely to change types"] #[unstable = "the timeout argument is likely to change types"]
pub fn connect_timeout<P>(path: P, timeout: Duration) pub fn connect_timeout<P>(path: P, timeout: Duration)
-> IoResult<UnixStream> -> IoResult<UnixStream>
where P: BytesContainer { where P: BytesContainer {
@ -107,7 +107,7 @@ impl UnixStream {
/// Sets the read/write timeout for this socket. /// Sets the read/write timeout for this socket.
/// ///
/// For more information, see `TcpStream::set_timeout` /// For more information, see `TcpStream::set_timeout`
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_timeout(timeout_ms) self.inner.set_timeout(timeout_ms)
} }
@ -115,7 +115,7 @@ impl UnixStream {
/// Sets the read timeout for this socket. /// Sets the read timeout for this socket.
/// ///
/// For more information, see `TcpStream::set_timeout` /// For more information, see `TcpStream::set_timeout`
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_read_timeout(timeout_ms) self.inner.set_read_timeout(timeout_ms)
} }
@ -123,7 +123,7 @@ impl UnixStream {
/// Sets the write timeout for this socket. /// Sets the write timeout for this socket.
/// ///
/// For more information, see `TcpStream::set_timeout` /// For more information, see `TcpStream::set_timeout`
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_write_timeout(timeout_ms) self.inner.set_write_timeout(timeout_ms)
} }
@ -219,7 +219,7 @@ impl UnixAcceptor {
/// When using this method, it is likely necessary to reset the timeout as /// When using this method, it is likely necessary to reset the timeout as
/// appropriate, the timeout specified is specific to this object, not /// appropriate, the timeout specified is specific to this object, not
/// specific to the next request. /// specific to the next request.
#[experimental = "the name and arguments to this function are likely \ #[unstable = "the name and arguments to this function are likely \
to change"] to change"]
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_timeout(timeout_ms) self.inner.set_timeout(timeout_ms)
@ -229,7 +229,7 @@ impl UnixAcceptor {
/// ///
/// This function has the same semantics as `TcpAcceptor::close_accept`, and /// This function has the same semantics as `TcpAcceptor::close_accept`, and
/// more information can be found in that documentation. /// more information can be found in that documentation.
#[experimental] #[unstable]
pub fn close_accept(&mut self) -> IoResult<()> { pub fn close_accept(&mut self) -> IoResult<()> {
self.inner.close_accept() self.inner.close_accept()
} }

View File

@ -85,7 +85,7 @@ impl TcpStream {
/// ///
/// If a `timeout` with zero or negative duration is specified then /// If a `timeout` with zero or negative duration is specified then
/// the function returns `Err`, with the error kind set to `TimedOut`. /// the function returns `Err`, with the error kind set to `TimedOut`.
#[experimental = "the timeout argument may eventually change types"] #[unstable = "the timeout argument may eventually change types"]
pub fn connect_timeout<A: ToSocketAddr>(addr: A, pub fn connect_timeout<A: ToSocketAddr>(addr: A,
timeout: Duration) -> IoResult<TcpStream> { timeout: Duration) -> IoResult<TcpStream> {
if timeout <= Duration::milliseconds(0) { if timeout <= Duration::milliseconds(0) {
@ -109,7 +109,7 @@ impl TcpStream {
} }
/// Sets the nodelay flag on this connection to the boolean specified /// Sets the nodelay flag on this connection to the boolean specified
#[experimental] #[unstable]
pub fn set_nodelay(&mut self, nodelay: bool) -> IoResult<()> { pub fn set_nodelay(&mut self, nodelay: bool) -> IoResult<()> {
self.inner.set_nodelay(nodelay) self.inner.set_nodelay(nodelay)
} }
@ -119,7 +119,7 @@ impl TcpStream {
/// If the value specified is `None`, then the keepalive flag is cleared on /// If the value specified is `None`, then the keepalive flag is cleared on
/// this connection. Otherwise, the keepalive timeout will be set to the /// this connection. Otherwise, the keepalive timeout will be set to the
/// specified time, in seconds. /// specified time, in seconds.
#[experimental] #[unstable]
pub fn set_keepalive(&mut self, delay_in_seconds: Option<uint>) -> IoResult<()> { pub fn set_keepalive(&mut self, delay_in_seconds: Option<uint>) -> IoResult<()> {
self.inner.set_keepalive(delay_in_seconds) self.inner.set_keepalive(delay_in_seconds)
} }
@ -187,7 +187,7 @@ impl TcpStream {
/// ///
/// For clarification on the semantics of interrupting a read and a write, /// For clarification on the semantics of interrupting a read and a write,
/// take a look at `set_read_timeout` and `set_write_timeout`. /// take a look at `set_read_timeout` and `set_write_timeout`.
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_timeout(timeout_ms) self.inner.set_timeout(timeout_ms)
} }
@ -204,7 +204,7 @@ impl TcpStream {
/// action is taken. Otherwise, the read operation will be scheduled to /// action is taken. Otherwise, the read operation will be scheduled to
/// promptly return. If a timeout error is returned, then no data was read /// promptly return. If a timeout error is returned, then no data was read
/// during the timeout period. /// during the timeout period.
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_read_timeout(timeout_ms) self.inner.set_read_timeout(timeout_ms)
} }
@ -231,7 +231,7 @@ impl TcpStream {
/// does not know how many bytes were written as part of the timeout /// does not know how many bytes were written as part of the timeout
/// operation. It may be the case that bytes continue to be written in an /// operation. It may be the case that bytes continue to be written in an
/// asynchronous fashion after the call to write returns. /// asynchronous fashion after the call to write returns.
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_write_timeout(timeout_ms) self.inner.set_write_timeout(timeout_ms)
} }
@ -374,7 +374,7 @@ impl TcpAcceptor {
/// # Example /// # Example
/// ///
/// ```no_run /// ```no_run
/// # #![allow(experimental)] /// # #![allow(unstable)]
/// use std::io::TcpListener; /// use std::io::TcpListener;
/// use std::io::{Listener, Acceptor, TimedOut}; /// use std::io::{Listener, Acceptor, TimedOut};
/// ///
@ -397,7 +397,7 @@ impl TcpAcceptor {
/// a.set_timeout(None); /// a.set_timeout(None);
/// let socket = a.accept(); /// let socket = a.accept();
/// ``` /// ```
#[experimental = "the type of the argument and name of this function are \ #[unstable = "the type of the argument and name of this function are \
subject to change"] subject to change"]
pub fn set_timeout(&mut self, ms: Option<u64>) { self.inner.set_timeout(ms); } pub fn set_timeout(&mut self, ms: Option<u64>) { self.inner.set_timeout(ms); }
@ -418,7 +418,7 @@ impl TcpAcceptor {
/// # Example /// # Example
/// ///
/// ``` /// ```
/// # #![allow(experimental)] /// # #![allow(unstable)]
/// use std::io::{TcpListener, Listener, Acceptor, EndOfFile}; /// use std::io::{TcpListener, Listener, Acceptor, EndOfFile};
/// use std::thread::Thread; /// use std::thread::Thread;
/// ///
@ -444,7 +444,7 @@ impl TcpAcceptor {
/// // Signal our accept loop to exit /// // Signal our accept loop to exit
/// assert!(a.close_accept().is_ok()); /// assert!(a.close_accept().is_ok());
/// ``` /// ```
#[experimental] #[unstable]
pub fn close_accept(&mut self) -> IoResult<()> { pub fn close_accept(&mut self) -> IoResult<()> {
self.inner.close_accept() self.inner.close_accept()
} }
@ -482,7 +482,7 @@ impl sys_common::AsInner<TcpAcceptorImp> for TcpAcceptor {
} }
#[cfg(test)] #[cfg(test)]
#[allow(experimental)] #[allow(unstable)]
mod test { mod test {
use prelude::v1::*; use prelude::v1::*;

View File

@ -92,13 +92,13 @@ impl UdpSocket {
} }
/// Joins a multicast IP address (becomes a member of it) /// Joins a multicast IP address (becomes a member of it)
#[experimental] #[unstable]
pub fn join_multicast(&mut self, multi: IpAddr) -> IoResult<()> { pub fn join_multicast(&mut self, multi: IpAddr) -> IoResult<()> {
self.inner.join_multicast(multi) self.inner.join_multicast(multi)
} }
/// Leaves a multicast IP address (drops membership from it) /// Leaves a multicast IP address (drops membership from it)
#[experimental] #[unstable]
pub fn leave_multicast(&mut self, multi: IpAddr) -> IoResult<()> { pub fn leave_multicast(&mut self, multi: IpAddr) -> IoResult<()> {
self.inner.leave_multicast(multi) self.inner.leave_multicast(multi)
} }
@ -106,25 +106,25 @@ impl UdpSocket {
/// Set the multicast loop flag to the specified value /// Set the multicast loop flag to the specified value
/// ///
/// This lets multicast packets loop back to local sockets (if enabled) /// This lets multicast packets loop back to local sockets (if enabled)
#[experimental] #[unstable]
pub fn set_multicast_loop(&mut self, on: bool) -> IoResult<()> { pub fn set_multicast_loop(&mut self, on: bool) -> IoResult<()> {
self.inner.set_multicast_loop(on) self.inner.set_multicast_loop(on)
} }
/// Sets the multicast TTL /// Sets the multicast TTL
#[experimental] #[unstable]
pub fn set_multicast_ttl(&mut self, ttl: int) -> IoResult<()> { pub fn set_multicast_ttl(&mut self, ttl: int) -> IoResult<()> {
self.inner.multicast_time_to_live(ttl) self.inner.multicast_time_to_live(ttl)
} }
/// Sets this socket's TTL /// Sets this socket's TTL
#[experimental] #[unstable]
pub fn set_ttl(&mut self, ttl: int) -> IoResult<()> { pub fn set_ttl(&mut self, ttl: int) -> IoResult<()> {
self.inner.time_to_live(ttl) self.inner.time_to_live(ttl)
} }
/// Sets the broadcast flag on or off /// Sets the broadcast flag on or off
#[experimental] #[unstable]
pub fn set_broadcast(&mut self, broadcast: bool) -> IoResult<()> { pub fn set_broadcast(&mut self, broadcast: bool) -> IoResult<()> {
self.inner.set_broadcast(broadcast) self.inner.set_broadcast(broadcast)
} }
@ -132,7 +132,7 @@ impl UdpSocket {
/// Sets the read/write timeout for this socket. /// Sets the read/write timeout for this socket.
/// ///
/// For more information, see `TcpStream::set_timeout` /// For more information, see `TcpStream::set_timeout`
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_timeout(timeout_ms) self.inner.set_timeout(timeout_ms)
} }
@ -140,7 +140,7 @@ impl UdpSocket {
/// Sets the read timeout for this socket. /// Sets the read timeout for this socket.
/// ///
/// For more information, see `TcpStream::set_timeout` /// For more information, see `TcpStream::set_timeout`
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_read_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_read_timeout(timeout_ms) self.inner.set_read_timeout(timeout_ms)
} }
@ -148,7 +148,7 @@ impl UdpSocket {
/// Sets the write timeout for this socket. /// Sets the write timeout for this socket.
/// ///
/// For more information, see `TcpStream::set_timeout` /// For more information, see `TcpStream::set_timeout`
#[experimental = "the timeout argument may change in type and value"] #[unstable = "the timeout argument may change in type and value"]
pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_write_timeout(&mut self, timeout_ms: Option<u64>) {
self.inner.set_write_timeout(timeout_ms) self.inner.set_write_timeout(timeout_ms)
} }
@ -176,7 +176,7 @@ impl sys_common::AsInner<UdpSocketImp> for UdpSocket {
} }
#[cfg(test)] #[cfg(test)]
#[allow(experimental)] #[allow(unstable)]
mod test { mod test {
use prelude::v1::*; use prelude::v1::*;

View File

@ -10,7 +10,7 @@
//! Bindings for executing child processes //! Bindings for executing child processes
#![allow(experimental)] #![allow(unstable)]
#![allow(non_upper_case_globals)] #![allow(non_upper_case_globals)]
pub use self::StdioContainer::*; pub use self::StdioContainer::*;
@ -661,7 +661,7 @@ impl Process {
/// # Example /// # Example
/// ///
/// ```no_run /// ```no_run
/// # #![allow(experimental)] /// # #![allow(unstable)]
/// use std::io::{Command, IoResult}; /// use std::io::{Command, IoResult};
/// use std::io::process::ProcessExit; /// use std::io::process::ProcessExit;
/// ///
@ -689,7 +689,7 @@ impl Process {
/// p.wait() /// p.wait()
/// } /// }
/// ``` /// ```
#[experimental = "the type of the timeout is likely to change"] #[unstable = "the type of the timeout is likely to change"]
pub fn set_timeout(&mut self, timeout_ms: Option<u64>) { pub fn set_timeout(&mut self, timeout_ms: Option<u64>) {
self.deadline = timeout_ms.map(|i| i + sys::timer::now()).unwrap_or(0); self.deadline = timeout_ms.map(|i| i + sys::timer::now()).unwrap_or(0);
} }

View File

@ -14,7 +14,7 @@
//! library. Each macro is available for use when linking against the standard //! library. Each macro is available for use when linking against the standard
//! library. //! library.
#![experimental] #![unstable]
/// The entry point for panic of Rust tasks. /// The entry point for panic of Rust tasks.
/// ///
@ -324,7 +324,7 @@ macro_rules! try {
/// ///
/// For more information about select, see the `std::sync::mpsc::Select` structure. /// For more information about select, see the `std::sync::mpsc::Select` structure.
#[macro_export] #[macro_export]
#[experimental] #[unstable]
macro_rules! select { macro_rules! select {
( (
$($name:pat = $rx:ident.$meth:ident() => $code:expr),+ $($name:pat = $rx:ident.$meth:ident() => $code:expr),+

View File

@ -366,7 +366,7 @@ impl Float for f32 {
/// ///
/// * num - The float value /// * num - The float value
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_string(num: f32) -> String { pub fn to_string(num: f32) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigAll, ExpNone, false); num, 10u, true, SignNeg, DigAll, ExpNone, false);
@ -379,7 +379,7 @@ pub fn to_string(num: f32) -> String {
/// ///
/// * num - The float value /// * num - The float value
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_hex(num: f32) -> String { pub fn to_str_hex(num: f32) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 16u, true, SignNeg, DigAll, ExpNone, false); num, 16u, true, SignNeg, DigAll, ExpNone, false);
@ -394,7 +394,7 @@ pub fn to_str_hex(num: f32) -> String {
/// * num - The float value /// * num - The float value
/// * radix - The base to use /// * radix - The base to use
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_radix_special(num: f32, rdx: uint) -> (String, bool) { pub fn to_str_radix_special(num: f32, rdx: uint) -> (String, bool) {
strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false) strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
} }
@ -407,7 +407,7 @@ pub fn to_str_radix_special(num: f32, rdx: uint) -> (String, bool) {
/// * num - The float value /// * num - The float value
/// * digits - The number of significant digits /// * digits - The number of significant digits
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_exact(num: f32, dig: uint) -> String { pub fn to_str_exact(num: f32, dig: uint) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigExact(dig), ExpNone, false); num, 10u, true, SignNeg, DigExact(dig), ExpNone, false);
@ -422,7 +422,7 @@ pub fn to_str_exact(num: f32, dig: uint) -> String {
/// * num - The float value /// * num - The float value
/// * digits - The number of significant digits /// * digits - The number of significant digits
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_digits(num: f32, dig: uint) -> String { pub fn to_str_digits(num: f32, dig: uint) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigMax(dig), ExpNone, false); num, 10u, true, SignNeg, DigMax(dig), ExpNone, false);
@ -438,7 +438,7 @@ pub fn to_str_digits(num: f32, dig: uint) -> String {
/// * digits - The number of digits after the decimal point /// * digits - The number of digits after the decimal point
/// * upper - Use `E` instead of `e` for the exponent sign /// * upper - Use `E` instead of `e` for the exponent sign
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String { pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper); num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper);
@ -454,7 +454,7 @@ pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
/// * digits - The number of digits after the decimal point /// * digits - The number of digits after the decimal point
/// * upper - Use `E` instead of `e` for the exponent sign /// * upper - Use `E` instead of `e` for the exponent sign
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> String { pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper); num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper);

View File

@ -375,7 +375,7 @@ impl Float for f64 {
/// ///
/// * num - The float value /// * num - The float value
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_string(num: f64) -> String { pub fn to_string(num: f64) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigAll, ExpNone, false); num, 10u, true, SignNeg, DigAll, ExpNone, false);
@ -388,7 +388,7 @@ pub fn to_string(num: f64) -> String {
/// ///
/// * num - The float value /// * num - The float value
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_hex(num: f64) -> String { pub fn to_str_hex(num: f64) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 16u, true, SignNeg, DigAll, ExpNone, false); num, 16u, true, SignNeg, DigAll, ExpNone, false);
@ -403,7 +403,7 @@ pub fn to_str_hex(num: f64) -> String {
/// * num - The float value /// * num - The float value
/// * radix - The base to use /// * radix - The base to use
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_radix_special(num: f64, rdx: uint) -> (String, bool) { pub fn to_str_radix_special(num: f64, rdx: uint) -> (String, bool) {
strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false) strconv::float_to_str_common(num, rdx, true, SignNeg, DigAll, ExpNone, false)
} }
@ -416,7 +416,7 @@ pub fn to_str_radix_special(num: f64, rdx: uint) -> (String, bool) {
/// * num - The float value /// * num - The float value
/// * digits - The number of significant digits /// * digits - The number of significant digits
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_exact(num: f64, dig: uint) -> String { pub fn to_str_exact(num: f64, dig: uint) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigExact(dig), ExpNone, false); num, 10u, true, SignNeg, DigExact(dig), ExpNone, false);
@ -431,7 +431,7 @@ pub fn to_str_exact(num: f64, dig: uint) -> String {
/// * num - The float value /// * num - The float value
/// * digits - The number of significant digits /// * digits - The number of significant digits
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_digits(num: f64, dig: uint) -> String { pub fn to_str_digits(num: f64, dig: uint) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigMax(dig), ExpNone, false); num, 10u, true, SignNeg, DigMax(dig), ExpNone, false);
@ -447,7 +447,7 @@ pub fn to_str_digits(num: f64, dig: uint) -> String {
/// * digits - The number of digits after the decimal point /// * digits - The number of digits after the decimal point
/// * upper - Use `E` instead of `e` for the exponent sign /// * upper - Use `E` instead of `e` for the exponent sign
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String { pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper); num, 10u, true, SignNeg, DigExact(dig), ExpDec, upper);
@ -463,7 +463,7 @@ pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
/// * digits - The number of digits after the decimal point /// * digits - The number of digits after the decimal point
/// * upper - Use `E` instead of `e` for the exponent sign /// * upper - Use `E` instead of `e` for the exponent sign
#[inline] #[inline]
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> String { pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> String {
let (r, _) = strconv::float_to_str_common( let (r, _) = strconv::float_to_str_common(
num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper); num, 10u, true, SignNeg, DigMax(dig), ExpDec, upper);

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![experimental] #![unstable]
#![doc(hidden)] #![doc(hidden)]
macro_rules! assert_approx_eq { macro_rules! assert_approx_eq {

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![experimental] #![unstable]
#![doc(hidden)] #![doc(hidden)]
macro_rules! int_module { ($T:ty) => ( macro_rules! int_module { ($T:ty) => (

View File

@ -33,7 +33,7 @@ pub use core::num::{FpCategory};
use option::Option; use option::Option;
#[experimental = "may be removed or relocated"] #[unstable = "may be removed or relocated"]
pub mod strconv; pub mod strconv;
/// Mathematical operations on primitive floating point numbers. /// Mathematical operations on primitive floating point numbers.

View File

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![experimental] #![unstable]
#![doc(hidden)] #![doc(hidden)]
#![allow(unsigned_negation)] #![allow(unsigned_negation)]

View File

@ -22,7 +22,7 @@
//! so we will not _hide_ the facts of which OS the user is on -- they should be given the //! so we will not _hide_ the facts of which OS the user is on -- they should be given the
//! opportunity to write OS-ignorant code by default. //! opportunity to write OS-ignorant code by default.
#![experimental] #![unstable]
#![allow(missing_docs)] #![allow(missing_docs)]
#![allow(non_snake_case)] #![allow(non_snake_case)]

View File

@ -59,7 +59,7 @@
//! println!("path exists: {}", path.exists()); //! println!("path exists: {}", path.exists());
//! ``` //! ```
#![experimental] #![unstable]
use core::marker::Sized; use core::marker::Sized;
use ffi::CString; use ffi::CString;

View File

@ -219,7 +219,7 @@
//! } //! }
//! ``` //! ```
#![experimental] #![unstable]
use cell::RefCell; use cell::RefCell;
use clone::Clone; use clone::Clone;

View File

@ -16,7 +16,7 @@
//! and should be considered as private implementation details for the //! and should be considered as private implementation details for the
//! time being. //! time being.
#![experimental] #![unstable]
// FIXME: this should not be here. // FIXME: this should not be here.
#![allow(missing_docs)] #![allow(missing_docs)]

View File

@ -582,7 +582,7 @@ fn begin_unwind_inner(msg: Box<Any + Send>, file_line: &(&'static str, uint)) ->
/// Only a limited number of callbacks can be registered, and this function /// Only a limited number of callbacks can be registered, and this function
/// returns whether the callback was successfully registered or not. It is not /// returns whether the callback was successfully registered or not. It is not
/// currently possible to unregister a callback once it has been registered. /// currently possible to unregister a callback once it has been registered.
#[experimental] #[unstable]
pub unsafe fn register(f: Callback) -> bool { pub unsafe fn register(f: Callback) -> bool {
match CALLBACK_CNT.fetch_add(1, Ordering::SeqCst) { match CALLBACK_CNT.fetch_add(1, Ordering::SeqCst) {
// The invocation code has knowledge of this window where the count has // The invocation code has knowledge of this window where the count has

View File

@ -12,7 +12,7 @@
//! the standard library This varies per-platform, but these libraries are //! the standard library This varies per-platform, but these libraries are
//! necessary for running libstd. //! necessary for running libstd.
#![experimental] #![unstable]
// All platforms need to link to rustrt // All platforms need to link to rustrt
#[cfg(not(test))] #[cfg(not(test))]

View File

@ -35,7 +35,7 @@
//! method, and see the method for more information about it. Due to this //! method, and see the method for more information about it. Due to this
//! caveat, this queue may not be appropriate for all use-cases. //! caveat, this queue may not be appropriate for all use-cases.
#![experimental] #![unstable]
// http://www.1024cores.net/home/lock-free-algorithms // http://www.1024cores.net/home/lock-free-algorithms
// /queues/non-intrusive-mpsc-node-based-queue // /queues/non-intrusive-mpsc-node-based-queue

View File

@ -46,7 +46,7 @@
//! ``` //! ```
#![allow(dead_code)] #![allow(dead_code)]
#![experimental = "This implementation, while likely sufficient, is unsafe and \ #![unstable = "This implementation, while likely sufficient, is unsafe and \
likely to be error prone. At some point in the future this \ likely to be error prone. At some point in the future this \
module will likely be replaced, and it is currently \ module will likely be replaced, and it is currently \
unknown how much API breakage that will cause. The ability \ unknown how much API breakage that will cause. The ability \

View File

@ -33,7 +33,7 @@
//! concurrently between two tasks. This data structure is safe to use and //! concurrently between two tasks. This data structure is safe to use and
//! enforces the semantics that there is one pusher and one popper. //! enforces the semantics that there is one pusher and one popper.
#![experimental] #![unstable]
use core::prelude::*; use core::prelude::*;

View File

@ -29,7 +29,7 @@
//! } //! }
//! ``` //! ```
#![experimental] #![unstable]
use sys_common::AsInner; use sys_common::AsInner;
use libc; use libc;

View File

@ -14,7 +14,7 @@
//! descriptors, and sockets, but its functionality will grow over //! descriptors, and sockets, but its functionality will grow over
//! time. //! time.
#![experimental] #![unstable]
use sys_common::AsInner; use sys_common::AsInner;
use libc; use libc;

View File

@ -207,14 +207,14 @@ impl Builder {
} }
/// Redirect thread-local stdout. /// Redirect thread-local stdout.
#[experimental = "Will likely go away after proc removal"] #[unstable = "Will likely go away after proc removal"]
pub fn stdout(mut self, stdout: Box<Writer + Send>) -> Builder { pub fn stdout(mut self, stdout: Box<Writer + Send>) -> Builder {
self.stdout = Some(stdout); self.stdout = Some(stdout);
self self
} }
/// Redirect thread-local stderr. /// Redirect thread-local stderr.
#[experimental = "Will likely go away after proc removal"] #[unstable = "Will likely go away after proc removal"]
pub fn stderr(mut self, stderr: Box<Writer + Send>) -> Builder { pub fn stderr(mut self, stderr: Box<Writer + Send>) -> Builder {
self.stderr = Some(stderr); self.stderr = Some(stderr);
self self
@ -483,7 +483,7 @@ impl<'a, T: Send + 'a> JoinGuard<'a, T> {
impl<T: Send> JoinGuard<'static, T> { impl<T: Send> JoinGuard<'static, T> {
/// Detaches the child thread, allowing it to outlive its parent. /// Detaches the child thread, allowing it to outlive its parent.
#[experimental = "unsure whether this API imposes limitations elsewhere"] #[unstable = "unsure whether this API imposes limitations elsewhere"]
pub fn detach(mut self) { pub fn detach(mut self) {
unsafe { imp::detach(self.native) }; unsafe { imp::detach(self.native) };
self.joined = true; // avoid joining in the destructor self.joined = true; // avoid joining in the destructor

View File

@ -10,7 +10,7 @@
//! Temporal quantification //! Temporal quantification
#![experimental] #![unstable]
use {fmt, i64}; use {fmt, i64};
use ops::{Add, Sub, Mul, Div, Neg, FnOnce}; use ops::{Add, Sub, Mul, Div, Neg, FnOnce};

View File

@ -15,7 +15,7 @@
//! This API is completely unstable and subject to change. //! This API is completely unstable and subject to change.
#![crate_name = "syntax"] #![crate_name = "syntax"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "dylib"] #![crate_type = "dylib"]
#![crate_type = "rlib"] #![crate_type = "rlib"]

View File

@ -39,7 +39,7 @@
//! [ti]: https://en.wikipedia.org/wiki/Terminfo //! [ti]: https://en.wikipedia.org/wiki/Terminfo
#![crate_name = "term"] #![crate_name = "term"]
#![experimental = "use the crates.io `term` library instead"] #![unstable = "use the crates.io `term` library instead"]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -24,7 +24,7 @@
// build off of. // build off of.
#![crate_name = "test"] #![crate_name = "test"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![crate_type = "dylib"] #![crate_type = "dylib"]

View File

@ -21,7 +21,7 @@
//! (yet) aim to provide a full set of Unicode tables. //! (yet) aim to provide a full set of Unicode tables.
#![crate_name = "unicode"] #![crate_name = "unicode"]
#![experimental] #![unstable]
#![staged_api] #![staged_api]
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",

View File

@ -112,7 +112,7 @@ pub trait CharExt {
/// 'XID_Start' is a Unicode Derived Property specified in /// 'XID_Start' is a Unicode Derived Property specified in
/// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
/// mostly similar to ID_Start but modified for closure under NFKx. /// mostly similar to ID_Start but modified for closure under NFKx.
#[experimental = "mainly needed for compiler internals"] #[unstable = "mainly needed for compiler internals"]
fn is_xid_start(self) -> bool; fn is_xid_start(self) -> bool;
/// Returns whether the specified `char` satisfies the 'XID_Continue' /// Returns whether the specified `char` satisfies the 'XID_Continue'
@ -121,7 +121,7 @@ pub trait CharExt {
/// 'XID_Continue' is a Unicode Derived Property specified in /// 'XID_Continue' is a Unicode Derived Property specified in
/// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications),
/// mostly similar to 'ID_Continue' but modified for closure under NFKx. /// mostly similar to 'ID_Continue' but modified for closure under NFKx.
#[experimental = "mainly needed for compiler internals"] #[unstable = "mainly needed for compiler internals"]
fn is_xid_continue(self) -> bool; fn is_xid_continue(self) -> bool;
/// Indicates whether a character is in lowercase. /// Indicates whether a character is in lowercase.
@ -171,7 +171,7 @@ pub trait CharExt {
/// ///
/// Returns the lowercase equivalent of the character, or the character /// Returns the lowercase equivalent of the character, or the character
/// itself if no conversion is possible. /// itself if no conversion is possible.
#[experimental = "pending case transformation decisions"] #[unstable = "pending case transformation decisions"]
fn to_lowercase(self) -> char; fn to_lowercase(self) -> char;
/// Converts a character to its uppercase equivalent. /// Converts a character to its uppercase equivalent.
@ -194,7 +194,7 @@ pub trait CharExt {
/// [`SpecialCasing`.txt`]: ftp://ftp.unicode.org/Public/UNIDATA/SpecialCasing.txt /// [`SpecialCasing`.txt`]: ftp://ftp.unicode.org/Public/UNIDATA/SpecialCasing.txt
/// ///
/// [2]: http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf#G33992 /// [2]: http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf#G33992
#[experimental = "pending case transformation decisions"] #[unstable = "pending case transformation decisions"]
fn to_uppercase(self) -> char; fn to_uppercase(self) -> char;
/// Returns this character's displayed width in columns, or `None` if it is a /// Returns this character's displayed width in columns, or `None` if it is a
@ -206,7 +206,7 @@ pub trait CharExt {
/// [Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/) /// [Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/)
/// recommends that these characters be treated as 1 column (i.e., /// recommends that these characters be treated as 1 column (i.e.,
/// `is_cjk` = `false`) if the context cannot be reliably determined. /// `is_cjk` = `false`) if the context cannot be reliably determined.
#[experimental = "needs expert opinion. is_cjk flag stands out as ugly"] #[unstable = "needs expert opinion. is_cjk flag stands out as ugly"]
fn width(self, is_cjk: bool) -> Option<uint>; fn width(self, is_cjk: bool) -> Option<uint>;
} }
@ -238,10 +238,10 @@ impl CharExt for char {
} }
} }
#[experimental = "mainly needed for compiler internals"] #[unstable = "mainly needed for compiler internals"]
fn is_xid_start(self) -> bool { derived_property::XID_Start(self) } fn is_xid_start(self) -> bool { derived_property::XID_Start(self) }
#[experimental = "mainly needed for compiler internals"] #[unstable = "mainly needed for compiler internals"]
fn is_xid_continue(self) -> bool { derived_property::XID_Continue(self) } fn is_xid_continue(self) -> bool { derived_property::XID_Continue(self) }
#[stable] #[stable]
@ -288,12 +288,12 @@ impl CharExt for char {
} }
} }
#[experimental = "pending case transformation decisions"] #[unstable = "pending case transformation decisions"]
fn to_lowercase(self) -> char { conversions::to_lower(self) } fn to_lowercase(self) -> char { conversions::to_lower(self) }
#[experimental = "pending case transformation decisions"] #[unstable = "pending case transformation decisions"]
fn to_uppercase(self) -> char { conversions::to_upper(self) } fn to_uppercase(self) -> char { conversions::to_upper(self) }
#[experimental = "needs expert opinion. is_cjk flag stands out as ugly"] #[unstable = "needs expert opinion. is_cjk flag stands out as ugly"]
fn width(self, is_cjk: bool) -> Option<uint> { charwidth::width(self, is_cjk) } fn width(self, is_cjk: bool) -> Option<uint> { charwidth::width(self, is_cjk) }
} }

View File

@ -9,7 +9,8 @@
// except according to those terms. // except according to those terms.
#![crate_name="inherited_stability"] #![crate_name="inherited_stability"]
#![crate_type = "lib"] #![crate_type = "lib"]
#![experimental] #![unstable]
#![staged_api]
pub fn experimental() {} pub fn experimental() {}
@ -26,7 +27,7 @@ pub mod stable_mod {
#[unstable] #[unstable]
pub mod unstable_mod { pub mod unstable_mod {
#[experimental] #[unstable]
pub fn experimental() {} pub fn experimental() {}
pub fn unstable() {} pub fn unstable() {}

View File

@ -10,13 +10,14 @@
#![crate_name="lint_output_format"] #![crate_name="lint_output_format"]
#![crate_type = "lib"] #![crate_type = "lib"]
#![staged_api]
#[deprecated] #[deprecated]
pub fn foo() -> uint { pub fn foo() -> uint {
20 20
} }
#[experimental] #[unstable]
pub fn bar() -> uint { pub fn bar() -> uint {
40 40
} }

View File

@ -9,15 +9,16 @@
// except according to those terms. // except according to those terms.
#![crate_name="lint_stability"] #![crate_name="lint_stability"]
#![crate_type = "lib"] #![crate_type = "lib"]
#![staged_api]
#[deprecated] #[deprecated]
pub fn deprecated() {} pub fn deprecated() {}
#[deprecated="text"] #[deprecated="text"]
pub fn deprecated_text() {} pub fn deprecated_text() {}
#[experimental] #[unstable]
pub fn experimental() {} pub fn experimental() {}
#[experimental="text"] #[unstable="text"]
pub fn experimental_text() {} pub fn experimental_text() {}
#[unstable] #[unstable]
@ -51,9 +52,9 @@ impl MethodTester {
#[deprecated="text"] #[deprecated="text"]
pub fn method_deprecated_text(&self) {} pub fn method_deprecated_text(&self) {}
#[experimental] #[unstable]
pub fn method_experimental(&self) {} pub fn method_experimental(&self) {}
#[experimental="text"] #[unstable="text"]
pub fn method_experimental_text(&self) {} pub fn method_experimental_text(&self) {}
#[unstable] #[unstable]
@ -85,9 +86,9 @@ pub trait Trait {
#[deprecated="text"] #[deprecated="text"]
fn trait_deprecated_text(&self) {} fn trait_deprecated_text(&self) {}
#[experimental] #[unstable]
fn trait_experimental(&self) {} fn trait_experimental(&self) {}
#[experimental="text"] #[unstable="text"]
fn trait_experimental_text(&self) {} fn trait_experimental_text(&self) {}
#[unstable] #[unstable]
@ -115,12 +116,12 @@ pub trait Trait {
impl Trait for MethodTester {} impl Trait for MethodTester {}
#[experimental] #[unstable]
pub trait ExperimentalTrait {} pub trait ExperimentalTrait {}
#[deprecated] #[deprecated]
pub struct DeprecatedStruct { pub i: int } pub struct DeprecatedStruct { pub i: int }
#[experimental] #[unstable]
pub struct ExperimentalStruct { pub i: int } pub struct ExperimentalStruct { pub i: int }
#[unstable] #[unstable]
pub struct UnstableStruct { pub i: int } pub struct UnstableStruct { pub i: int }
@ -134,7 +135,7 @@ pub struct LockedStruct { pub i: int }
#[deprecated] #[deprecated]
pub struct DeprecatedUnitStruct; pub struct DeprecatedUnitStruct;
#[experimental] #[unstable]
pub struct ExperimentalUnitStruct; pub struct ExperimentalUnitStruct;
#[unstable] #[unstable]
pub struct UnstableUnitStruct; pub struct UnstableUnitStruct;
@ -149,7 +150,7 @@ pub struct LockedUnitStruct;
pub enum Enum { pub enum Enum {
#[deprecated] #[deprecated]
DeprecatedVariant, DeprecatedVariant,
#[experimental] #[unstable]
ExperimentalVariant, ExperimentalVariant,
#[unstable] #[unstable]
UnstableVariant, UnstableVariant,
@ -165,7 +166,7 @@ pub enum Enum {
#[deprecated] #[deprecated]
pub struct DeprecatedTupleStruct(pub int); pub struct DeprecatedTupleStruct(pub int);
#[experimental] #[unstable]
pub struct ExperimentalTupleStruct(pub int); pub struct ExperimentalTupleStruct(pub int);
#[unstable] #[unstable]
pub struct UnstableTupleStruct(pub int); pub struct UnstableTupleStruct(pub int);

View File

@ -10,3 +10,4 @@
#![cfg_attr(foo, experimental)] #![cfg_attr(foo, experimental)]
#![cfg_attr(not(foo), stable)] #![cfg_attr(not(foo), stable)]
#![staged_api]

View File

@ -10,6 +10,6 @@
// compile-flags:--cfg foo // compile-flags:--cfg foo
#![cfg_attr(foo, experimental)] #![cfg_attr(foo, unstable)]
#![cfg_attr(not(foo), stable)] #![cfg_attr(not(foo), stable)]
#![staged_api]

View File

@ -39,7 +39,7 @@
// OF THE POSSIBILITY OF SUCH DAMAGE. // OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(simd)] #![feature(simd)]
#![allow(experimental)] #![allow(unstable)]
// ignore-pretty very bad with line comments // ignore-pretty very bad with line comments

View File

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![staged_api]
#![deny(deprecated)] #![deny(deprecated)]
struct Foo; struct Foo;

View File

@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![forbid(experimental)] #![forbid(unstable)]
#[allow(experimental)] //~ ERROR allow(experimental) overruled by outer forbid(experimental) #[allow(unstable)] //~ ERROR allow(unstable) overruled by outer forbid(unstable)
fn main() { fn main() {
} }

View File

@ -8,8 +8,9 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// compile-flags: -F experimental // compile-flags: -F unstable
#[allow(experimental)] //~ ERROR allow(experimental) overruled by outer forbid(experimental) #![staged_api]
#[allow(unstable)] //~ ERROR allow(unstable) overruled by outer forbid(unstable)
fn main() { fn main() {
} }

View File

@ -8,14 +8,13 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// compile-flags:-F experimental -D unstable // compile-flags:-F unstable
// aux-build:lint_output_format.rs // aux-build:lint_output_format.rs
extern crate lint_output_format; //~ ERROR: use of unmarked item extern crate lint_output_format; //~ ERROR: use of unmarked item
use lint_output_format::{foo, bar, baz}; use lint_output_format::{foo, bar};
fn main() { fn main() {
let _x = foo(); //~ WARNING #[warn(deprecated)] on by default let _x = foo(); //~ WARNING #[warn(deprecated)] on by default
let _y = bar(); //~ ERROR [-F experimental] let _y = bar(); //~ ERROR [-F unstable]
let _z = baz(); //~ ERROR [-D unstable]
} }

View File

@ -15,15 +15,16 @@
#![deny(unstable)] #![deny(unstable)]
#![deny(deprecated)] #![deny(deprecated)]
#![deny(experimental)] #![deny(unstable)]
#![allow(dead_code)] #![allow(dead_code)]
#![staged_api]
#[macro_use] #[macro_use]
extern crate lint_stability; //~ ERROR: use of unmarked item extern crate lint_stability; //~ ERROR: use of unmarked item
mod cross_crate { mod cross_crate {
extern crate stability_cfg1; extern crate stability_cfg1;
extern crate stability_cfg2; //~ ERROR: use of experimental item extern crate stability_cfg2; //~ ERROR: use of unstable item
use lint_stability::*; use lint_stability::*;
@ -38,13 +39,13 @@ mod cross_crate {
foo.method_deprecated_text(); //~ ERROR use of deprecated item: text foo.method_deprecated_text(); //~ ERROR use of deprecated item: text
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
experimental(); //~ ERROR use of experimental item experimental(); //~ ERROR use of unstable item
foo.method_experimental(); //~ ERROR use of experimental item foo.method_experimental(); //~ ERROR use of unstable item
foo.trait_experimental(); //~ ERROR use of experimental item foo.trait_experimental(); //~ ERROR use of unstable item
experimental_text(); //~ ERROR use of experimental item: text experimental_text(); //~ ERROR use of unstable item: text
foo.method_experimental_text(); //~ ERROR use of experimental item: text foo.method_experimental_text(); //~ ERROR use of unstable item: text
foo.trait_experimental_text(); //~ ERROR use of experimental item: text foo.trait_experimental_text(); //~ ERROR use of unstable item: text
unstable(); //~ ERROR use of unstable item unstable(); //~ ERROR use of unstable item
foo.method_unstable(); //~ ERROR use of unstable item foo.method_unstable(); //~ ERROR use of unstable item
@ -83,7 +84,7 @@ mod cross_crate {
foo.trait_locked_text(); foo.trait_locked_text();
let _ = DeprecatedStruct { i: 0 }; //~ ERROR use of deprecated item let _ = DeprecatedStruct { i: 0 }; //~ ERROR use of deprecated item
let _ = ExperimentalStruct { i: 0 }; //~ ERROR use of experimental item let _ = ExperimentalStruct { i: 0 }; //~ ERROR use of unstable item
let _ = UnstableStruct { i: 0 }; //~ ERROR use of unstable item let _ = UnstableStruct { i: 0 }; //~ ERROR use of unstable item
let _ = UnmarkedStruct { i: 0 }; //~ ERROR use of unmarked item let _ = UnmarkedStruct { i: 0 }; //~ ERROR use of unmarked item
let _ = StableStruct { i: 0 }; let _ = StableStruct { i: 0 };
@ -91,7 +92,7 @@ mod cross_crate {
let _ = LockedStruct { i: 0 }; let _ = LockedStruct { i: 0 };
let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item let _ = DeprecatedUnitStruct; //~ ERROR use of deprecated item
let _ = ExperimentalUnitStruct; //~ ERROR use of experimental item let _ = ExperimentalUnitStruct; //~ ERROR use of unstable item
let _ = UnstableUnitStruct; //~ ERROR use of unstable item let _ = UnstableUnitStruct; //~ ERROR use of unstable item
let _ = UnmarkedUnitStruct; //~ ERROR use of unmarked item let _ = UnmarkedUnitStruct; //~ ERROR use of unmarked item
let _ = StableUnitStruct; let _ = StableUnitStruct;
@ -99,7 +100,7 @@ mod cross_crate {
let _ = LockedUnitStruct; let _ = LockedUnitStruct;
let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item let _ = Enum::DeprecatedVariant; //~ ERROR use of deprecated item
let _ = Enum::ExperimentalVariant; //~ ERROR use of experimental item let _ = Enum::ExperimentalVariant; //~ ERROR use of unstable item
let _ = Enum::UnstableVariant; //~ ERROR use of unstable item let _ = Enum::UnstableVariant; //~ ERROR use of unstable item
let _ = Enum::UnmarkedVariant; //~ ERROR use of unmarked item let _ = Enum::UnmarkedVariant; //~ ERROR use of unmarked item
let _ = Enum::StableVariant; let _ = Enum::StableVariant;
@ -107,7 +108,7 @@ mod cross_crate {
let _ = Enum::LockedVariant; let _ = Enum::LockedVariant;
let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item let _ = DeprecatedTupleStruct (1); //~ ERROR use of deprecated item
let _ = ExperimentalTupleStruct (1); //~ ERROR use of experimental item let _ = ExperimentalTupleStruct (1); //~ ERROR use of unstable item
let _ = UnstableTupleStruct (1); //~ ERROR use of unstable item let _ = UnstableTupleStruct (1); //~ ERROR use of unstable item
let _ = UnmarkedTupleStruct (1); //~ ERROR use of unmarked item let _ = UnmarkedTupleStruct (1); //~ ERROR use of unmarked item
let _ = StableTupleStruct (1); let _ = StableTupleStruct (1);
@ -128,8 +129,8 @@ mod cross_crate {
fn test_method_param<F: Trait>(foo: F) { fn test_method_param<F: Trait>(foo: F) {
foo.trait_deprecated(); //~ ERROR use of deprecated item foo.trait_deprecated(); //~ ERROR use of deprecated item
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
foo.trait_experimental(); //~ ERROR use of experimental item foo.trait_experimental(); //~ ERROR use of unstable item
foo.trait_experimental_text(); //~ ERROR use of experimental item: text foo.trait_experimental_text(); //~ ERROR use of unstable item: text
foo.trait_unstable(); //~ ERROR use of unstable item foo.trait_unstable(); //~ ERROR use of unstable item
foo.trait_unstable_text(); //~ ERROR use of unstable item: text foo.trait_unstable_text(); //~ ERROR use of unstable item: text
foo.trait_unmarked(); //~ ERROR use of unmarked item foo.trait_unmarked(); //~ ERROR use of unmarked item
@ -139,8 +140,8 @@ mod cross_crate {
fn test_method_object(foo: &Trait) { fn test_method_object(foo: &Trait) {
foo.trait_deprecated(); //~ ERROR use of deprecated item foo.trait_deprecated(); //~ ERROR use of deprecated item
foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text foo.trait_deprecated_text(); //~ ERROR use of deprecated item: text
foo.trait_experimental(); //~ ERROR use of experimental item foo.trait_experimental(); //~ ERROR use of unstable item
foo.trait_experimental_text(); //~ ERROR use of experimental item: text foo.trait_experimental_text(); //~ ERROR use of unstable item: text
foo.trait_unstable(); //~ ERROR use of unstable item foo.trait_unstable(); //~ ERROR use of unstable item
foo.trait_unstable_text(); //~ ERROR use of unstable item: text foo.trait_unstable_text(); //~ ERROR use of unstable item: text
foo.trait_unmarked(); //~ ERROR use of unmarked item foo.trait_unmarked(); //~ ERROR use of unmarked item
@ -149,33 +150,33 @@ mod cross_crate {
struct S; struct S;
impl ExperimentalTrait for S { } //~ ERROR use of experimental item impl ExperimentalTrait for S { } //~ ERROR use of unstable item
trait LocalTrait : ExperimentalTrait { } //~ ERROR use of experimental item trait LocalTrait : ExperimentalTrait { } //~ ERROR use of unstable item
} }
mod inheritance { mod inheritance {
extern crate inherited_stability; //~ ERROR: use of experimental item extern crate inherited_stability; //~ ERROR: use of unstable item
use self::inherited_stability::*; use self::inherited_stability::*;
fn test_inheritance() { fn test_inheritance() {
experimental(); //~ ERROR use of experimental item experimental(); //~ ERROR use of unstable item
stable(); stable();
stable_mod::experimental(); //~ ERROR use of experimental item stable_mod::experimental(); //~ ERROR use of unstable item
stable_mod::stable(); stable_mod::stable();
unstable_mod::experimental(); //~ ERROR use of experimental item unstable_mod::experimental(); //~ ERROR use of unstable item
unstable_mod::unstable(); //~ ERROR use of unstable item unstable_mod::unstable(); //~ ERROR use of unstable item
experimental_mod::experimental(); //~ ERROR use of experimental item experimental_mod::experimental(); //~ ERROR use of unstable item
experimental_mod::stable(); experimental_mod::stable();
let _ = Experimental::ExperimentalVariant; //~ ERROR use of experimental item let _ = Experimental::ExperimentalVariant; //~ ERROR use of unstable item
let _ = Experimental::StableVariant; let _ = Experimental::StableVariant;
let x: uint = 0; let x: uint = 0;
x.experimental(); //~ ERROR use of experimental item x.experimental(); //~ ERROR use of unstable item
x.stable(); x.stable();
} }
} }
@ -186,9 +187,9 @@ mod this_crate {
#[deprecated="text"] #[deprecated="text"]
pub fn deprecated_text() {} pub fn deprecated_text() {}
#[experimental] #[unstable]
pub fn experimental() {} pub fn experimental() {}
#[experimental="text"] #[unstable="text"]
pub fn experimental_text() {} pub fn experimental_text() {}
#[unstable] #[unstable]
@ -222,9 +223,9 @@ mod this_crate {
#[deprecated="text"] #[deprecated="text"]
pub fn method_deprecated_text(&self) {} pub fn method_deprecated_text(&self) {}
#[experimental] #[unstable]
pub fn method_experimental(&self) {} pub fn method_experimental(&self) {}
#[experimental="text"] #[unstable="text"]
pub fn method_experimental_text(&self) {} pub fn method_experimental_text(&self) {}
#[unstable] #[unstable]
@ -256,9 +257,9 @@ mod this_crate {
#[deprecated="text"] #[deprecated="text"]
fn trait_deprecated_text(&self) {} fn trait_deprecated_text(&self) {}
#[experimental] #[unstable]
fn trait_experimental(&self) {} fn trait_experimental(&self) {}
#[experimental="text"] #[unstable="text"]
fn trait_experimental_text(&self) {} fn trait_experimental_text(&self) {}
#[unstable] #[unstable]
@ -288,7 +289,7 @@ mod this_crate {
#[deprecated] #[deprecated]
pub struct DeprecatedStruct { i: int } pub struct DeprecatedStruct { i: int }
#[experimental] #[unstable]
pub struct ExperimentalStruct { i: int } pub struct ExperimentalStruct { i: int }
#[unstable] #[unstable]
pub struct UnstableStruct { i: int } pub struct UnstableStruct { i: int }
@ -302,7 +303,7 @@ mod this_crate {
#[deprecated] #[deprecated]
pub struct DeprecatedUnitStruct; pub struct DeprecatedUnitStruct;
#[experimental] #[unstable]
pub struct ExperimentalUnitStruct; pub struct ExperimentalUnitStruct;
#[unstable] #[unstable]
pub struct UnstableUnitStruct; pub struct UnstableUnitStruct;
@ -317,7 +318,7 @@ mod this_crate {
pub enum Enum { pub enum Enum {
#[deprecated] #[deprecated]
DeprecatedVariant, DeprecatedVariant,
#[experimental] #[unstable]
ExperimentalVariant, ExperimentalVariant,
#[unstable] #[unstable]
UnstableVariant, UnstableVariant,
@ -333,7 +334,7 @@ mod this_crate {
#[deprecated] #[deprecated]
pub struct DeprecatedTupleStruct(int); pub struct DeprecatedTupleStruct(int);
#[experimental] #[unstable]
pub struct ExperimentalTupleStruct(int); pub struct ExperimentalTupleStruct(int);
#[unstable] #[unstable]
pub struct UnstableTupleStruct(int); pub struct UnstableTupleStruct(int);

View File

@ -10,7 +10,7 @@
// ignore-tidy-linelength // ignore-tidy-linelength
#![allow(experimental)] #![allow(unstable)]
use std::simd::f32x4; use std::simd::f32x4;

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