Add missing annotations and some tests

This commit is contained in:
Vadim Petrochenkov 2015-11-16 19:54:28 +03:00
parent 52acc05f63
commit 7e2ffc7090
87 changed files with 439 additions and 21 deletions

View File

@ -130,10 +130,13 @@ pub struct Arc<T: ?Sized> {
_ptr: Shared<ArcInner<T>>, _ptr: Shared<ArcInner<T>>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Sync + Send> Send for Arc<T> { } unsafe impl<T: ?Sized + Sync + Send> Send for Arc<T> { }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> { } unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> { }
#[cfg(not(stage0))] // remove cfg after new snapshot #[cfg(not(stage0))] // remove cfg after new snapshot
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {} impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
/// A weak pointer to an `Arc`. /// A weak pointer to an `Arc`.
@ -148,10 +151,13 @@ pub struct Weak<T: ?Sized> {
_ptr: Shared<ArcInner<T>>, _ptr: Shared<ArcInner<T>>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> { } unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> { }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> { } unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> { }
#[cfg(not(stage0))] // remove cfg after new snapshot #[cfg(not(stage0))] // remove cfg after new snapshot
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {} impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
@ -1157,6 +1163,7 @@ mod tests {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> borrow::Borrow<T> for Arc<T> { impl<T: ?Sized> borrow::Borrow<T> for Arc<T> {
fn borrow(&self) -> &T { fn borrow(&self) -> &T {
&**self &**self

View File

@ -136,6 +136,9 @@ pub struct IntermediateBox<T: ?Sized> {
marker: marker::PhantomData<*mut T>, marker: marker::PhantomData<*mut T>,
} }
#[unstable(feature = "placement_in",
reason = "placement box design is still being worked out.",
issue = "27779")]
impl<T> Place<T> for IntermediateBox<T> { impl<T> Place<T> for IntermediateBox<T> {
fn pointer(&mut self) -> *mut T { fn pointer(&mut self) -> *mut T {
self.ptr as *mut T self.ptr as *mut T
@ -170,12 +173,18 @@ fn make_place<T>() -> IntermediateBox<T> {
} }
} }
#[unstable(feature = "placement_in",
reason = "placement box design is still being worked out.",
issue = "27779")]
impl<T> BoxPlace<T> for IntermediateBox<T> { impl<T> BoxPlace<T> for IntermediateBox<T> {
fn make_place() -> IntermediateBox<T> { fn make_place() -> IntermediateBox<T> {
make_place() make_place()
} }
} }
#[unstable(feature = "placement_in",
reason = "placement box design is still being worked out.",
issue = "27779")]
impl<T> InPlace<T> for IntermediateBox<T> { impl<T> InPlace<T> for IntermediateBox<T> {
type Owner = Box<T>; type Owner = Box<T>;
unsafe fn finalize(self) -> Box<T> { unsafe fn finalize(self) -> Box<T> {
@ -183,6 +192,7 @@ impl<T> InPlace<T> for IntermediateBox<T> {
} }
} }
#[unstable(feature = "placement_new_protocol", issue = "27779")]
impl<T> Boxed for Box<T> { impl<T> Boxed for Box<T> {
type Data = T; type Data = T;
type Place = IntermediateBox<T>; type Place = IntermediateBox<T>;
@ -191,6 +201,9 @@ impl<T> Boxed for Box<T> {
} }
} }
#[unstable(feature = "placement_in",
reason = "placement box design is still being worked out.",
issue = "27779")]
impl<T> Placer<T> for ExchangeHeapSingleton { impl<T> Placer<T> for ExchangeHeapSingleton {
type Place = IntermediateBox<T>; type Place = IntermediateBox<T>;
@ -199,6 +212,9 @@ impl<T> Placer<T> for ExchangeHeapSingleton {
} }
} }
#[unstable(feature = "placement_in",
reason = "placement box design is still being worked out.",
issue = "27779")]
impl<T: ?Sized> Drop for IntermediateBox<T> { impl<T: ?Sized> Drop for IntermediateBox<T> {
fn drop(&mut self) { fn drop(&mut self) {
if self.size > 0 { if self.size > 0 {
@ -518,6 +534,7 @@ pub trait FnBox<A> {
fn call_box(self: Box<Self>, args: A) -> Self::Output; fn call_box(self: Box<Self>, args: A) -> Self::Output;
} }
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
impl<A,F> FnBox<A> for F impl<A,F> FnBox<A> for F
where F: FnOnce<A> where F: FnOnce<A>
{ {
@ -528,6 +545,7 @@ impl<A,F> FnBox<A> for F
} }
} }
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+'a> { impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+'a> {
type Output = R; type Output = R;
@ -536,6 +554,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+'a> {
} }
} }
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> { impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> {
type Output = R; type Output = R;
@ -544,6 +563,7 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> {
} }
} }
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {} impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
#[stable(feature = "box_slice_clone", since = "1.3.0")] #[stable(feature = "box_slice_clone", since = "1.3.0")]
@ -597,12 +617,14 @@ impl<T: Clone> Clone for Box<[T]> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> borrow::Borrow<T> for Box<T> { impl<T: ?Sized> borrow::Borrow<T> for Box<T> {
fn borrow(&self) -> &T { fn borrow(&self) -> &T {
&**self &**self
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> borrow::BorrowMut<T> for Box<T> { impl<T: ?Sized> borrow::BorrowMut<T> for Box<T> {
fn borrow_mut(&mut self) -> &mut T { fn borrow_mut(&mut self) -> &mut T {
&mut **self &mut **self

View File

@ -191,10 +191,13 @@ pub struct Rc<T: ?Sized> {
_ptr: Shared<RcBox<T>>, _ptr: Shared<RcBox<T>>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !marker::Send for Rc<T> {} impl<T: ?Sized> !marker::Send for Rc<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !marker::Sync for Rc<T> {} impl<T: ?Sized> !marker::Sync for Rc<T> {}
#[cfg(not(stage0))] // remove cfg after new snapshot #[cfg(not(stage0))] // remove cfg after new snapshot
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {} impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}
impl<T> Rc<T> { impl<T> Rc<T> {
@ -723,10 +726,13 @@ pub struct Weak<T: ?Sized> {
_ptr: Shared<RcBox<T>>, _ptr: Shared<RcBox<T>>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !marker::Send for Weak<T> {} impl<T: ?Sized> !marker::Send for Weak<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !marker::Sync for Weak<T> {} impl<T: ?Sized> !marker::Sync for Weak<T> {}
#[cfg(not(stage0))] // remove cfg after new snapshot #[cfg(not(stage0))] // remove cfg after new snapshot
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {} impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
impl<T: ?Sized> Weak<T> { impl<T: ?Sized> Weak<T> {
@ -1126,6 +1132,7 @@ mod tests {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> borrow::Borrow<T> for Rc<T> { impl<T: ?Sized> borrow::Borrow<T> for Rc<T> {
fn borrow(&self) -> &T { fn borrow(&self) -> &T {
&**self &**self

View File

@ -731,6 +731,7 @@ impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {} impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Ord> From<Vec<T>> for BinaryHeap<T> { impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
fn from(vec: Vec<T>) -> BinaryHeap<T> { fn from(vec: Vec<T>) -> BinaryHeap<T> {
let mut heap = BinaryHeap { data: vec }; let mut heap = BinaryHeap { data: vec };
@ -743,6 +744,7 @@ impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> From<BinaryHeap<T>> for Vec<T> { impl<T> From<BinaryHeap<T>> for Vec<T> {
fn from(heap: BinaryHeap<T>) -> Vec<T> { fn from(heap: BinaryHeap<T>) -> Vec<T> {
heap.data heap.data

View File

@ -24,6 +24,7 @@ use fmt;
use self::Cow::*; use self::Cow::*;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::borrow::{Borrow, BorrowMut}; pub use core::borrow::{Borrow, BorrowMut};
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]

View File

@ -451,7 +451,6 @@ impl<K, V> Node<K, V> {
} }
// FIXME(gereeter) Write an efficient clone_from // FIXME(gereeter) Write an efficient clone_from
#[stable(feature = "rust1", since = "1.0.0")]
impl<K: Clone, V: Clone> Clone for Node<K, V> { impl<K: Clone, V: Clone> Clone for Node<K, V> {
fn clone(&self) -> Node<K, V> { fn clone(&self) -> Node<K, V> {
let mut ret = if self.is_leaf() { let mut ret = if self.is_leaf() {

View File

@ -475,13 +475,21 @@
#![stable(feature = "rust1", since = "1.0.0")] #![stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::{Formatter, Result, Write, rt}; pub use core::fmt::{Formatter, Result, Write, rt};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::{Octal, Binary}; pub use core::fmt::{Octal, Binary};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::{Display, Debug}; pub use core::fmt::{Display, Debug};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::{LowerHex, UpperHex, Pointer}; pub use core::fmt::{LowerHex, UpperHex, Pointer};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::{LowerExp, UpperExp}; pub use core::fmt::{LowerExp, UpperExp};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::Error; pub use core::fmt::Error;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::{ArgumentV1, Arguments, write, radix, Radix, RadixFmt}; pub use core::fmt::{ArgumentV1, Arguments, write, radix, Radix, RadixFmt};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple}; pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
use string; use string;

View File

@ -107,11 +107,13 @@ pub mod vec_deque;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub mod btree_map { pub mod btree_map {
#[stable(feature = "rust1", since = "1.0.0")]
pub use btree::map::*; pub use btree::map::*;
} }
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub mod btree_set { pub mod btree_set {
#[stable(feature = "rust1", since = "1.0.0")]
pub use btree::set::*; pub use btree::set::*;
} }

View File

@ -857,6 +857,7 @@ impl<A> DoubleEndedIterator for IntoIter<A> {
fn next_back(&mut self) -> Option<A> { self.list.pop_back() } fn next_back(&mut self) -> Option<A> { self.list.pop_back() }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<A> ExactSizeIterator for IntoIter<A> {} impl<A> ExactSizeIterator for IntoIter<A> {}
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
@ -890,6 +891,7 @@ impl<'a, T> IntoIterator for &'a LinkedList<T> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoIterator for &'a mut LinkedList<T> { impl<'a, T> IntoIterator for &'a mut LinkedList<T> {
type Item = &'a mut T; type Item = &'a mut T;
type IntoIter = IterMut<'a, T>; type IntoIter = IterMut<'a, T>;

View File

@ -102,12 +102,18 @@ use core::slice as core_slice;
use borrow::{Borrow, BorrowMut, ToOwned}; use borrow::{Borrow, BorrowMut, ToOwned};
use vec::Vec; use vec::Vec;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::slice::{Chunks, Windows}; pub use core::slice::{Chunks, Windows};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::slice::{Iter, IterMut}; pub use core::slice::{Iter, IterMut};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::slice::{SplitMut, ChunksMut, Split}; pub use core::slice::{SplitMut, ChunksMut, Split};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut}; pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut};
#[unstable(feature = "ref_slice", issue = "27774")]
#[allow(deprecated)] #[allow(deprecated)]
pub use core::slice::{bytes, mut_ref_slice, ref_slice}; pub use core::slice::{bytes, mut_ref_slice, ref_slice};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::slice::{from_raw_parts, from_raw_parts_mut}; pub use core::slice::{from_raw_parts, from_raw_parts_mut};
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -860,6 +866,9 @@ pub trait SliceConcatExt<T: ?Sized> {
fn connect(&self, sep: &T) -> Self::Output; fn connect(&self, sep: &T) -> Self::Output;
} }
#[unstable(feature = "slice_concat_ext",
reason = "trait should not have to exist",
issue = "27747")]
impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] { impl<T: Clone, V: Borrow<[T]>> SliceConcatExt<T> for [V] {
type Output = Vec<T>; type Output = Vec<T>;

View File

@ -37,19 +37,33 @@ use vec::Vec;
use slice::SliceConcatExt; use slice::SliceConcatExt;
use boxed::Box; use boxed::Box;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{FromStr, Utf8Error}; pub use core::str::{FromStr, Utf8Error};
#[allow(deprecated)] #[allow(deprecated)]
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{Lines, LinesAny, CharRange}; pub use core::str::{Lines, LinesAny, CharRange};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{Split, RSplit}; pub use core::str::{Split, RSplit};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{SplitN, RSplitN}; pub use core::str::{SplitN, RSplitN};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{SplitTerminator, RSplitTerminator}; pub use core::str::{SplitTerminator, RSplitTerminator};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{Matches, RMatches}; pub use core::str::{Matches, RMatches};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{MatchIndices, RMatchIndices}; pub use core::str::{MatchIndices, RMatchIndices};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{from_utf8, Chars, CharIndices, Bytes}; pub use core::str::{from_utf8, Chars, CharIndices, Bytes};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{from_utf8_unchecked, ParseBoolError}; pub use core::str::{from_utf8_unchecked, ParseBoolError};
#[stable(feature = "rust1", since = "1.0.0")]
pub use rustc_unicode::str::{SplitWhitespace}; pub use rustc_unicode::str::{SplitWhitespace};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::pattern; pub use core::str::pattern;
#[unstable(feature = "slice_concat_ext",
reason = "trait should not have to exist",
issue = "27747")]
impl<S: Borrow<str>> SliceConcatExt<str> for [S] { impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
type Output = String; type Output = String;

View File

@ -949,6 +949,9 @@ impl Extend<String> for String {
} }
/// A convenience impl that delegates to the impl for `&str` /// A convenience impl that delegates to the impl for `&str`
#[unstable(feature = "pattern",
reason = "API not fully fleshed out and ready to be stabilized",
issue = "27721")]
impl<'a, 'b> Pattern<'a> for &'b String { impl<'a, 'b> Pattern<'a> for &'b String {
type Searcher = <&'b str as Pattern<'a>>::Searcher; type Searcher = <&'b str as Pattern<'a>>::Searcher;
@ -1143,24 +1146,28 @@ impl FromStr for String {
} }
} }
#[stable(feature = "str_parse_error", since = "1.5.0")]
impl Clone for ParseError { impl Clone for ParseError {
fn clone(&self) -> ParseError { fn clone(&self) -> ParseError {
match *self {} match *self {}
} }
} }
#[stable(feature = "str_parse_error", since = "1.5.0")]
impl fmt::Debug for ParseError { impl fmt::Debug for ParseError {
fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
match *self {} match *self {}
} }
} }
#[stable(feature = "str_parse_error", since = "1.5.0")]
impl PartialEq for ParseError { impl PartialEq for ParseError {
fn eq(&self, _: &ParseError) -> bool { fn eq(&self, _: &ParseError) -> bool {
match *self {} match *self {}
} }
} }
#[stable(feature = "str_parse_error", since = "1.5.0")]
impl Eq for ParseError {} impl Eq for ParseError {}
/// A generic trait for converting a value to a string /// A generic trait for converting a value to a string
@ -1287,7 +1294,9 @@ pub struct Drain<'a> {
iter: Chars<'a>, iter: Chars<'a>,
} }
#[unstable(feature = "drain", reason = "recently added", issue = "27711")]
unsafe impl<'a> Sync for Drain<'a> {} unsafe impl<'a> Sync for Drain<'a> {}
#[unstable(feature = "drain", reason = "recently added", issue = "27711")]
unsafe impl<'a> Send for Drain<'a> {} unsafe impl<'a> Send for Drain<'a> {}
#[unstable(feature = "drain", reason = "recently added", issue = "27711")] #[unstable(feature = "drain", reason = "recently added", issue = "27711")]

View File

@ -1471,12 +1471,14 @@ impl<'a, T> FromIterator<T> for Cow<'a, [T]> where T: Clone {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T: 'a> IntoCow<'a, [T]> for Vec<T> where T: Clone { impl<'a, T: 'a> IntoCow<'a, [T]> for Vec<T> where T: Clone {
fn into_cow(self) -> Cow<'a, [T]> { fn into_cow(self) -> Cow<'a, [T]> {
Cow::Owned(self) Cow::Owned(self)
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> IntoCow<'a, [T]> for &'a [T] where T: Clone { impl<'a, T> IntoCow<'a, [T]> for &'a [T] where T: Clone {
fn into_cow(self) -> Cow<'a, [T]> { fn into_cow(self) -> Cow<'a, [T]> {
Cow::Borrowed(self) Cow::Borrowed(self)
@ -1495,7 +1497,9 @@ pub struct IntoIter<T> {
end: *const T end: *const T
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: Send> Send for IntoIter<T> { } unsafe impl<T: Send> Send for IntoIter<T> { }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: Sync> Sync for IntoIter<T> { } unsafe impl<T: Sync> Sync for IntoIter<T> { }
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
@ -1590,7 +1594,9 @@ pub struct Drain<'a, T: 'a> {
vec: *mut Vec<T>, vec: *mut Vec<T>,
} }
#[unstable(feature = "drain", reason = "recently added", issue = "27711")]
unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {} unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {}
#[unstable(feature = "drain", reason = "recently added", issue = "27711")]
unsafe impl<'a, T: Send> Send for Drain<'a, T> {} unsafe impl<'a, T: Send> Send for Drain<'a, T> {}
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]

View File

@ -1662,6 +1662,7 @@ pub struct Iter<'a, T:'a> {
} }
// FIXME(#19839) Remove in favor of `#[derive(Clone)]` // FIXME(#19839) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Iter<'a, T> { impl<'a, T> Clone for Iter<'a, T> {
fn clone(&self) -> Iter<'a, T> { fn clone(&self) -> Iter<'a, T> {
Iter { Iter {
@ -1805,7 +1806,9 @@ pub struct Drain<'a, T: 'a> {
deque: *mut VecDeque<T>, deque: *mut VecDeque<T>,
} }
#[unstable(feature = "drain", issue = "27711")]
unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {} unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {}
#[unstable(feature = "drain", issue = "27711")]
unsafe impl<'a, T: Send> Send for Drain<'a, T> {} unsafe impl<'a, T: Send> Send for Drain<'a, T> {}
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]

View File

@ -97,6 +97,7 @@ pub trait Any: Reflect + 'static {
fn get_type_id(&self) -> TypeId; fn get_type_id(&self) -> TypeId;
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Reflect + 'static> Any for T { impl<T: Reflect + 'static> Any for T {
fn get_type_id(&self) -> TypeId { TypeId::of::<T>() } fn get_type_id(&self) -> TypeId { TypeId::of::<T>() }
} }

View File

@ -791,6 +791,7 @@ pub struct UnsafeCell<T: ?Sized> {
value: T, value: T,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !Sync for UnsafeCell<T> {} impl<T: ?Sized> !Sync for UnsafeCell<T> {}
impl<T> UnsafeCell<T> { impl<T> UnsafeCell<T> {

View File

@ -152,6 +152,9 @@ pub trait CharExt {
fn encode_utf16(self, dst: &mut [u16]) -> Option<usize>; fn encode_utf16(self, dst: &mut [u16]) -> Option<usize>;
} }
#[unstable(feature = "core_char_ext",
reason = "the stable interface is `impl char` in later crate",
issue = "27701")]
impl CharExt for char { impl CharExt for char {
#[inline] #[inline]
fn is_digit(self, radix: u32) -> bool { fn is_digit(self, radix: u32) -> bool {

View File

@ -24,10 +24,13 @@ use slice;
use str; use str;
use self::rt::v1::Alignment; use self::rt::v1::Alignment;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::num::radix; pub use self::num::radix;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::num::Radix; pub use self::num::Radix;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::num::RadixFmt; pub use self::num::RadixFmt;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::builders::{DebugStruct, DebugTuple, DebugSet, DebugList, DebugMap}; pub use self::builders::{DebugStruct, DebugTuple, DebugSet, DebugList, DebugMap};
mod num; mod num;
@ -170,6 +173,8 @@ pub struct ArgumentV1<'a> {
formatter: fn(&Void, &mut Formatter) -> Result, formatter: fn(&Void, &mut Formatter) -> Result,
} }
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
issue = "0")]
impl<'a> Clone for ArgumentV1<'a> { impl<'a> Clone for ArgumentV1<'a> {
fn clone(&self) -> ArgumentV1<'a> { fn clone(&self) -> ArgumentV1<'a> {
*self *self
@ -1568,6 +1573,7 @@ impl Debug for () {
f.pad("()") f.pad("()")
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> Debug for PhantomData<T> { impl<T> Debug for PhantomData<T> {
fn fmt(&self, f: &mut Formatter) -> Result { fn fmt(&self, f: &mut Formatter) -> Result {
f.pad("PhantomData") f.pad("PhantomData")

View File

@ -264,6 +264,7 @@ const DEC_DIGITS_LUT: &'static[u8] =
macro_rules! impl_Display { macro_rules! impl_Display {
($($t:ident),*: $conv_fn:ident) => ($( ($($t:ident),*: $conv_fn:ident) => ($(
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Display for $t { impl fmt::Display for $t {
#[allow(unused_comparisons)] #[allow(unused_comparisons)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -75,6 +75,7 @@ use prelude::v1::*;
use mem; use mem;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::sip::SipHasher; pub use self::sip::SipHasher;
mod sip; mod sip;

View File

@ -3488,6 +3488,7 @@ impl<I: Iterator> Peekable<I> {
/// ///
/// assert_eq!(iter.is_empty(), true); /// assert_eq!(iter.is_empty(), true);
/// ``` /// ```
#[unstable(feature = "core", issue = "27701")]
#[inline] #[inline]
pub fn is_empty(&mut self) -> bool { pub fn is_empty(&mut self) -> bool {
self.peek().is_none() self.peek().is_none()
@ -3991,6 +3992,9 @@ pub trait Step: PartialOrd + Sized {
macro_rules! step_impl_unsigned { macro_rules! step_impl_unsigned {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
#[unstable(feature = "step_trait",
reason = "likely to be replaced by finer-grained traits",
issue = "27741")]
impl Step for $t { impl Step for $t {
#[inline] #[inline]
fn step(&self, by: &$t) -> Option<$t> { fn step(&self, by: &$t) -> Option<$t> {
@ -4018,6 +4022,9 @@ macro_rules! step_impl_unsigned {
} }
macro_rules! step_impl_signed { macro_rules! step_impl_signed {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
#[unstable(feature = "step_trait",
reason = "likely to be replaced by finer-grained traits",
issue = "27741")]
impl Step for $t { impl Step for $t {
#[inline] #[inline]
fn step(&self, by: &$t) -> Option<$t> { fn step(&self, by: &$t) -> Option<$t> {
@ -4057,6 +4064,9 @@ macro_rules! step_impl_signed {
macro_rules! step_impl_no_between { macro_rules! step_impl_no_between {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
#[unstable(feature = "step_trait",
reason = "likely to be replaced by finer-grained traits",
issue = "27741")]
impl Step for $t { impl Step for $t {
#[inline] #[inline]
fn step(&self, by: &$t) -> Option<$t> { fn step(&self, by: &$t) -> Option<$t> {

View File

@ -31,9 +31,12 @@ pub unsafe trait Send {
// empty. // empty.
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl Send for .. { } unsafe impl Send for .. { }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> !Send for *const T { } impl<T> !Send for *const T { }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> !Send for *mut T { } impl<T> !Send for *mut T { }
/// Types with a constant size known at compile-time. /// Types with a constant size known at compile-time.
@ -223,48 +226,59 @@ pub unsafe trait Sync {
// Empty // Empty
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl Sync for .. { } unsafe impl Sync for .. { }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> !Sync for *const T { } impl<T> !Sync for *const T { }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> !Sync for *mut T { } impl<T> !Sync for *mut T { }
macro_rules! impls{ macro_rules! impls{
($t: ident) => ( ($t: ident) => (
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> Hash for $t<T> { impl<T:?Sized> Hash for $t<T> {
#[inline] #[inline]
fn hash<H: Hasher>(&self, _: &mut H) { fn hash<H: Hasher>(&self, _: &mut H) {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> cmp::PartialEq for $t<T> { impl<T:?Sized> cmp::PartialEq for $t<T> {
fn eq(&self, _other: &$t<T>) -> bool { fn eq(&self, _other: &$t<T>) -> bool {
true true
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> cmp::Eq for $t<T> { impl<T:?Sized> cmp::Eq for $t<T> {
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> cmp::PartialOrd for $t<T> { impl<T:?Sized> cmp::PartialOrd for $t<T> {
fn partial_cmp(&self, _other: &$t<T>) -> Option<cmp::Ordering> { fn partial_cmp(&self, _other: &$t<T>) -> Option<cmp::Ordering> {
Option::Some(cmp::Ordering::Equal) Option::Some(cmp::Ordering::Equal)
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> cmp::Ord for $t<T> { impl<T:?Sized> cmp::Ord for $t<T> {
fn cmp(&self, _other: &$t<T>) -> cmp::Ordering { fn cmp(&self, _other: &$t<T>) -> cmp::Ordering {
cmp::Ordering::Equal cmp::Ordering::Equal
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> Copy for $t<T> { } impl<T:?Sized> Copy for $t<T> { }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> Clone for $t<T> { impl<T:?Sized> Clone for $t<T> {
fn clone(&self) -> $t<T> { fn clone(&self) -> $t<T> {
$t $t
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T:?Sized> Default for $t<T> { impl<T:?Sized> Default for $t<T> {
fn default() -> $t<T> { fn default() -> $t<T> {
$t $t
@ -387,7 +401,9 @@ impls! { PhantomData }
mod impls { mod impls {
use super::{Send, Sync, Sized}; use super::{Send, Sync, Sized};
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Sync + ?Sized> Send for &'a T {} unsafe impl<'a, T: Sync + ?Sized> Send for &'a T {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Send + ?Sized> Send for &'a mut T {} unsafe impl<'a, T: Send + ?Sized> Send for &'a mut T {}
} }
@ -433,4 +449,7 @@ mod impls {
ensure all type parameters are bounded by `Any`"] ensure all type parameters are bounded by `Any`"]
pub trait Reflect {} pub trait Reflect {}
#[unstable(feature = "reflect_marker",
reason = "requires RFC and more experience",
issue = "27749")]
impl Reflect for .. { } impl Reflect for .. { }

View File

@ -141,6 +141,9 @@ pub mod consts {
pub const LN_10: f32 = 2.30258509299404568401799145468436421_f32; pub const LN_10: f32 = 2.30258509299404568401799145468436421_f32;
} }
#[unstable(feature = "core_float",
reason = "stable interface is via `impl f{32,64}` in later crates",
issue = "27702")]
impl Float for f32 { impl Float for f32 {
#[inline] #[inline]
fn nan() -> f32 { NAN } fn nan() -> f32 { NAN }

View File

@ -141,6 +141,9 @@ pub mod consts {
pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64; pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64;
} }
#[unstable(feature = "core_float",
reason = "stable interface is via `impl f{32,64}` in later crates",
issue = "27702")]
impl Float for f64 { impl Float for f64 {
#[inline] #[inline]
fn nan() -> f64 { NAN } fn nan() -> f64 { NAN }

View File

@ -77,10 +77,16 @@ pub trait One: Sized {
macro_rules! zero_one_impl { macro_rules! zero_one_impl {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
#[unstable(feature = "zero_one",
reason = "unsure of placement, wants to use associated constants",
issue = "27739")]
impl Zero for $t { impl Zero for $t {
#[inline] #[inline]
fn zero() -> Self { 0 } fn zero() -> Self { 0 }
} }
#[unstable(feature = "zero_one",
reason = "unsure of placement, wants to use associated constants",
issue = "27739")]
impl One for $t { impl One for $t {
#[inline] #[inline]
fn one() -> Self { 1 } fn one() -> Self { 1 }
@ -91,10 +97,16 @@ zero_one_impl! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
macro_rules! zero_one_impl_float { macro_rules! zero_one_impl_float {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
#[unstable(feature = "zero_one",
reason = "unsure of placement, wants to use associated constants",
issue = "27739")]
impl Zero for $t { impl Zero for $t {
#[inline] #[inline]
fn zero() -> Self { 0.0 } fn zero() -> Self { 0.0 }
} }
#[unstable(feature = "zero_one",
reason = "unsure of placement, wants to use associated constants",
issue = "27739")]
impl One for $t { impl One for $t {
#[inline] #[inline]
fn one() -> Self { 1.0 } fn one() -> Self { 1.0 }
@ -1938,6 +1950,7 @@ impl fmt::Display for ParseIntError {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
pub use num::dec2flt::ParseFloatError; pub use num::dec2flt::ParseFloatError;
// Conversion traits for primitive integer and float types // Conversion traits for primitive integer and float types

View File

@ -894,6 +894,7 @@ pub trait Shr<RHS> {
macro_rules! shr_impl { macro_rules! shr_impl {
($t:ty, $f:ty) => ( ($t:ty, $f:ty) => (
#[stable(feature = "rust1", since = "1.0.0")]
impl Shr<$f> for $t { impl Shr<$f> for $t {
type Output = $t; type Output = $t;
@ -1731,6 +1732,7 @@ impl<'a, T: ?Sized> DerefMut for &'a mut T {
#[fundamental] // so that regex can rely that `&str: !FnMut` #[fundamental] // so that regex can rely that `&str: !FnMut`
pub trait Fn<Args> : FnMut<Args> { pub trait Fn<Args> : FnMut<Args> {
/// This is called when the call operator is used. /// This is called when the call operator is used.
#[unstable(feature = "core", issue = "27701")]
extern "rust-call" fn call(&self, args: Args) -> Self::Output; extern "rust-call" fn call(&self, args: Args) -> Self::Output;
} }
@ -1741,6 +1743,7 @@ pub trait Fn<Args> : FnMut<Args> {
#[fundamental] // so that regex can rely that `&str: !FnMut` #[fundamental] // so that regex can rely that `&str: !FnMut`
pub trait FnMut<Args> : FnOnce<Args> { pub trait FnMut<Args> : FnOnce<Args> {
/// This is called when the call operator is used. /// This is called when the call operator is used.
#[unstable(feature = "core", issue = "27701")]
extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
} }
@ -1751,9 +1754,11 @@ pub trait FnMut<Args> : FnOnce<Args> {
#[fundamental] // so that regex can rely that `&str: !FnMut` #[fundamental] // so that regex can rely that `&str: !FnMut`
pub trait FnOnce<Args> { pub trait FnOnce<Args> {
/// The returned type after the call operator is used. /// The returned type after the call operator is used.
#[unstable(feature = "core", issue = "27701")]
type Output; type Output;
/// This is called when the call operator is used. /// This is called when the call operator is used.
#[unstable(feature = "core", issue = "27701")]
extern "rust-call" fn call_once(self, args: Args) -> Self::Output; extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
} }
@ -1761,6 +1766,7 @@ mod impls {
use marker::Sized; use marker::Sized;
use super::{Fn, FnMut, FnOnce}; use super::{Fn, FnMut, FnOnce};
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> Fn<A> for &'a F impl<'a,A,F:?Sized> Fn<A> for &'a F
where F : Fn<A> where F : Fn<A>
{ {
@ -1769,6 +1775,7 @@ mod impls {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnMut<A> for &'a F impl<'a,A,F:?Sized> FnMut<A> for &'a F
where F : Fn<A> where F : Fn<A>
{ {
@ -1777,6 +1784,7 @@ mod impls {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnOnce<A> for &'a F impl<'a,A,F:?Sized> FnOnce<A> for &'a F
where F : Fn<A> where F : Fn<A>
{ {
@ -1787,6 +1795,7 @@ mod impls {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnMut<A> for &'a mut F impl<'a,A,F:?Sized> FnMut<A> for &'a mut F
where F : FnMut<A> where F : FnMut<A>
{ {
@ -1795,6 +1804,7 @@ mod impls {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a,A,F:?Sized> FnOnce<A> for &'a mut F impl<'a,A,F:?Sized> FnOnce<A> for &'a mut F
where F : FnMut<A> where F : FnMut<A>
{ {
@ -1814,25 +1824,34 @@ pub trait CoerceUnsized<T> {
} }
// &mut T -> &mut U // &mut T -> &mut U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a mut U> for &'a mut T {} impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a mut U> for &'a mut T {}
// &mut T -> &U // &mut T -> &U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'a, 'b: 'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b mut T {} impl<'a, 'b: 'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b mut T {}
// &mut T -> *mut U // &mut T -> *mut U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for &'a mut T {} impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for &'a mut T {}
// &mut T -> *const U // &mut T -> *const U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a mut T {} impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a mut T {}
// &T -> &U // &T -> &U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'a, 'b: 'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {} impl<'a, 'b: 'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {}
// &T -> *const U // &T -> *const U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a T {} impl<'a, T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a T {}
// *mut T -> *mut U // *mut T -> *mut U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {} impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
// *mut T -> *const U // *mut T -> *const U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *mut T {} impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *mut T {}
// *const T -> *const U // *const T -> *const U
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {} impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
/// Both `in (PLACE) EXPR` and `box EXPR` desugar into expressions /// Both `in (PLACE) EXPR` and `box EXPR` desugar into expressions

View File

@ -17,23 +17,37 @@
#![stable(feature = "core_prelude", since = "1.4.0")] #![stable(feature = "core_prelude", since = "1.4.0")]
// Reexported core operators // Reexported core operators
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync}; #[doc(no_inline)] pub use marker::{Copy, Send, Sized, Sync};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce}; #[doc(no_inline)] pub use ops::{Drop, Fn, FnMut, FnOnce};
// Reexported functions // Reexported functions
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use mem::drop; #[doc(no_inline)] pub use mem::drop;
// Reexported types and traits // Reexported types and traits
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use clone::Clone; #[doc(no_inline)] pub use clone::Clone;
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord}; #[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From}; #[doc(no_inline)] pub use convert::{AsRef, AsMut, Into, From};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use default::Default; #[doc(no_inline)] pub use default::Default;
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use iter::{Iterator, Extend, IntoIterator}; #[doc(no_inline)] pub use iter::{Iterator, Extend, IntoIterator};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use iter::{DoubleEndedIterator, ExactSizeIterator}; #[doc(no_inline)] pub use iter::{DoubleEndedIterator, ExactSizeIterator};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use option::Option::{self, Some, None}; #[doc(no_inline)] pub use option::Option::{self, Some, None};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use result::Result::{self, Ok, Err}; #[doc(no_inline)] pub use result::Result::{self, Ok, Err};
// Reexported extension traits for primitive types // Reexported extension traits for primitive types
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use slice::SliceExt; #[doc(no_inline)] pub use slice::SliceExt;
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use str::StrExt; #[doc(no_inline)] pub use str::StrExt;
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)] pub use char::CharExt; #[doc(no_inline)] pub use char::CharExt;

View File

@ -40,6 +40,7 @@ pub use intrinsics::copy;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use intrinsics::write_bytes; pub use intrinsics::write_bytes;
#[unstable(feature = "drop_in_place", reason = "just exposed, needs FCP", issue = "27908")]
pub use intrinsics::drop_in_place; pub use intrinsics::drop_in_place;
/// Creates a null raw pointer. /// Creates a null raw pointer.

View File

@ -870,6 +870,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> ExactSizeIterator for Iter<'a, T> {} impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T> Clone for Iter<'a, T> { impl<'a, T> Clone for Iter<'a, T> {
fn clone(&self) -> Iter<'a, T> { Iter { inner: self.inner } } fn clone(&self) -> Iter<'a, T> { Iter { inner: self.inner } }
} }

View File

@ -154,6 +154,9 @@ macro_rules! slice_ref {
}}; }};
} }
#[unstable(feature = "core_slice_ext",
reason = "stable interface provided by `impl [T]` in later crates",
issue = "27701")]
impl<T> SliceExt for [T] { impl<T> SliceExt for [T] {
type Item = T; type Item = T;
@ -796,7 +799,9 @@ pub struct Iter<'a, T: 'a> {
_marker: marker::PhantomData<&'a T>, _marker: marker::PhantomData<&'a T>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Sync> Sync for Iter<'a, T> {} unsafe impl<'a, T: Sync> Sync for Iter<'a, T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Sync> Send for Iter<'a, T> {} unsafe impl<'a, T: Sync> Send for Iter<'a, T> {}
impl<'a, T> Iter<'a, T> { impl<'a, T> Iter<'a, T> {
@ -842,7 +847,9 @@ pub struct IterMut<'a, T: 'a> {
_marker: marker::PhantomData<&'a mut T>, _marker: marker::PhantomData<&'a mut T>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Sync> Sync for IterMut<'a, T> {} unsafe impl<'a, T: Sync> Sync for IterMut<'a, T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<'a, T: Send> Send for IterMut<'a, T> {} unsafe impl<'a, T: Send> Send for IterMut<'a, T> {}
impl<'a, T> IterMut<'a, T> { impl<'a, T> IterMut<'a, T> {

View File

@ -1440,6 +1440,9 @@ fn slice_error_fail(s: &str, begin: usize, end: usize) -> ! {
begin, end, s); begin, end, s);
} }
#[unstable(feature = "core_str_ext",
reason = "stable interface provided by `impl str` in later crates",
issue = "27701")]
impl StrExt for str { impl StrExt for str {
#[inline] #[inline]
fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool { fn contains<'a, P: Pattern<'a>>(&'a self, pat: P) -> bool {

View File

@ -86,6 +86,7 @@ pub struct AtomicBool {
v: UnsafeCell<usize>, v: UnsafeCell<usize>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl Default for AtomicBool { impl Default for AtomicBool {
fn default() -> Self { fn default() -> Self {
Self::new(Default::default()) Self::new(Default::default())
@ -93,6 +94,7 @@ impl Default for AtomicBool {
} }
// Send is implicitly implemented for AtomicBool. // Send is implicitly implemented for AtomicBool.
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl Sync for AtomicBool {} unsafe impl Sync for AtomicBool {}
/// A signed integer type which can be safely shared between threads. /// A signed integer type which can be safely shared between threads.
@ -101,6 +103,7 @@ pub struct AtomicIsize {
v: UnsafeCell<isize>, v: UnsafeCell<isize>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl Default for AtomicIsize { impl Default for AtomicIsize {
fn default() -> Self { fn default() -> Self {
Self::new(Default::default()) Self::new(Default::default())
@ -108,6 +111,7 @@ impl Default for AtomicIsize {
} }
// Send is implicitly implemented for AtomicIsize. // Send is implicitly implemented for AtomicIsize.
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl Sync for AtomicIsize {} unsafe impl Sync for AtomicIsize {}
/// An unsigned integer type which can be safely shared between threads. /// An unsigned integer type which can be safely shared between threads.
@ -116,6 +120,7 @@ pub struct AtomicUsize {
v: UnsafeCell<usize>, v: UnsafeCell<usize>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl Default for AtomicUsize { impl Default for AtomicUsize {
fn default() -> Self { fn default() -> Self {
Self::new(Default::default()) Self::new(Default::default())
@ -123,6 +128,7 @@ impl Default for AtomicUsize {
} }
// Send is implicitly implemented for AtomicUsize. // Send is implicitly implemented for AtomicUsize.
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl Sync for AtomicUsize {} unsafe impl Sync for AtomicUsize {}
/// A raw pointer type which can be safely shared between threads. /// A raw pointer type which can be safely shared between threads.
@ -131,13 +137,16 @@ pub struct AtomicPtr<T> {
p: UnsafeCell<*mut T>, p: UnsafeCell<*mut T>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> Default for AtomicPtr<T> { impl<T> Default for AtomicPtr<T> {
fn default() -> AtomicPtr<T> { fn default() -> AtomicPtr<T> {
AtomicPtr::new(::ptr::null_mut()) AtomicPtr::new(::ptr::null_mut())
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T> Send for AtomicPtr<T> {} unsafe impl<T> Send for AtomicPtr<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T> Sync for AtomicPtr<T> {} unsafe impl<T> Sync for AtomicPtr<T> {}
/// Atomic memory orderings /// Atomic memory orderings

View File

@ -27,8 +27,6 @@
//! * `Ord` //! * `Ord`
//! * `Default` //! * `Default`
#![stable(feature = "rust1", since = "1.0.0")]
use clone::Clone; use clone::Clone;
use cmp::*; use cmp::*;
use cmp::Ordering::*; use cmp::Ordering::*;

View File

@ -35,9 +35,11 @@ use core::iter::Iterator;
use tables::{derived_property, property, general_category, conversions}; use tables::{derived_property, property, general_category, conversions};
// stable reexports // stable reexports
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::char::{MAX, from_u32, from_u32_unchecked, from_digit, EscapeUnicode, EscapeDefault}; pub use core::char::{MAX, from_u32, from_u32_unchecked, from_digit, EscapeUnicode, EscapeDefault};
// unstable reexports // unstable reexports
#[unstable(feature = "unicode", issue = "27783")]
pub use tables::UNICODE_VERSION; pub use tables::UNICODE_VERSION;
/// An iterator over the lowercase mapping of a given character, returned from /// An iterator over the lowercase mapping of a given character, returned from

View File

@ -1215,6 +1215,7 @@ fn search_entry_hashed<'a, K: Eq, V>(table: &'a mut RawTable<K,V>, hash: SafeHas
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<K, V, S> PartialEq for HashMap<K, V, S> impl<K, V, S> PartialEq for HashMap<K, V, S>
where K: Eq + Hash, V: PartialEq, S: HashState where K: Eq + Hash, V: PartialEq, S: HashState
{ {
@ -1272,6 +1273,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
} }
// FIXME(#19839) Remove in favor of `#[derive(Clone)]` // FIXME(#19839) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> Clone for Iter<'a, K, V> { impl<'a, K, V> Clone for Iter<'a, K, V> {
fn clone(&self) -> Iter<'a, K, V> { fn clone(&self) -> Iter<'a, K, V> {
Iter { Iter {
@ -1299,6 +1301,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
} }
// FIXME(#19839) Remove in favor of `#[derive(Clone)]` // FIXME(#19839) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> Clone for Keys<'a, K, V> { impl<'a, K, V> Clone for Keys<'a, K, V> {
fn clone(&self) -> Keys<'a, K, V> { fn clone(&self) -> Keys<'a, K, V> {
Keys { Keys {
@ -1314,6 +1317,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
} }
// FIXME(#19839) Remove in favor of `#[derive(Clone)]` // FIXME(#19839) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K, V> Clone for Values<'a, K, V> { impl<'a, K, V> Clone for Values<'a, K, V> {
fn clone(&self) -> Values<'a, K, V> { fn clone(&self) -> Values<'a, K, V> {
Values { Values {

View File

@ -901,6 +901,7 @@ impl<T, S> IntoIterator for HashSet<T, S>
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K> Clone for Iter<'a, K> { impl<'a, K> Clone for Iter<'a, K> {
fn clone(&self) -> Iter<'a, K> { Iter { iter: self.iter.clone() } } fn clone(&self) -> Iter<'a, K> { Iter { iter: self.iter.clone() } }
} }
@ -940,6 +941,7 @@ impl<'a, K> ExactSizeIterator for Drain<'a, K> {
fn len(&self) -> usize { self.iter.len() } fn len(&self) -> usize { self.iter.len() }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T, S> Clone for Intersection<'a, T, S> { impl<'a, T, S> Clone for Intersection<'a, T, S> {
fn clone(&self) -> Intersection<'a, T, S> { fn clone(&self) -> Intersection<'a, T, S> {
Intersection { iter: self.iter.clone(), ..*self } Intersection { iter: self.iter.clone(), ..*self }
@ -969,6 +971,7 @@ impl<'a, T, S> Iterator for Intersection<'a, T, S>
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T, S> Clone for Difference<'a, T, S> { impl<'a, T, S> Clone for Difference<'a, T, S> {
fn clone(&self) -> Difference<'a, T, S> { fn clone(&self) -> Difference<'a, T, S> {
Difference { iter: self.iter.clone(), ..*self } Difference { iter: self.iter.clone(), ..*self }
@ -998,6 +1001,7 @@ impl<'a, T, S> Iterator for Difference<'a, T, S>
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T, S> Clone for SymmetricDifference<'a, T, S> { impl<'a, T, S> Clone for SymmetricDifference<'a, T, S> {
fn clone(&self) -> SymmetricDifference<'a, T, S> { fn clone(&self) -> SymmetricDifference<'a, T, S> {
SymmetricDifference { iter: self.iter.clone() } SymmetricDifference { iter: self.iter.clone() }
@ -1014,6 +1018,7 @@ impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S>
fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() } fn size_hint(&self) -> (usize, Option<usize>) { self.iter.size_hint() }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T, S> Clone for Union<'a, T, S> { impl<'a, T, S> Clone for Union<'a, T, S> {
fn clone(&self) -> Union<'a, T, S> { Union { iter: self.iter.clone() } } fn clone(&self) -> Union<'a, T, S> { Union { iter: self.iter.clone() } }
} }

View File

@ -408,14 +408,20 @@
#![stable(feature = "rust1", since = "1.0.0")] #![stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::Bound; pub use core_collections::Bound;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::{BinaryHeap, BTreeMap, BTreeSet}; pub use core_collections::{BinaryHeap, BTreeMap, BTreeSet};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::{LinkedList, VecDeque}; pub use core_collections::{LinkedList, VecDeque};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::{binary_heap, btree_map, btree_set}; pub use core_collections::{binary_heap, btree_map, btree_set};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::{linked_list, vec_deque}; pub use core_collections::{linked_list, vec_deque};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::hash_map::HashMap; pub use self::hash_map::HashMap;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::hash_set::HashSet; pub use self::hash_set::HashSet;
mod hash; mod hash;
@ -423,12 +429,14 @@ mod hash;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub mod hash_map { pub mod hash_map {
//! A hashmap //! A hashmap
#[stable(feature = "rust1", since = "1.0.0")]
pub use super::hash::map::*; pub use super::hash::map::*;
} }
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub mod hash_set { pub mod hash_set {
//! A hashset //! A hashset
#[stable(feature = "rust1", since = "1.0.0")]
pub use super::hash::set::*; pub use super::hash::set::*;
} }

View File

@ -324,6 +324,7 @@ impl IntoInner<fs_imp::File> for File {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for File { impl fmt::Debug for File {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.inner.fmt(f) self.inner.fmt(f)
@ -1230,6 +1231,7 @@ pub trait PathExt {
} }
#[allow(deprecated)] #[allow(deprecated)]
#[unstable(feature = "path_ext_deprecated", issue = "27725")]
impl PathExt for Path { impl PathExt for Path {
fn metadata(&self) -> io::Result<Metadata> { metadata(self) } fn metadata(&self) -> io::Result<Metadata> { metadata(self) }
fn symlink_metadata(&self) -> io::Result<Metadata> { symlink_metadata(self) } fn symlink_metadata(&self) -> io::Result<Metadata> { symlink_metadata(self) }

View File

@ -485,6 +485,7 @@ impl<W: Write + Seek> Seek for BufWriter<W> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<W: Write> Drop for BufWriter<W> { impl<W: Write> Drop for BufWriter<W> {
fn drop(&mut self) { fn drop(&mut self) {
if self.inner.is_some() { if self.inner.is_some() {

View File

@ -255,13 +255,21 @@ use string::String;
use str; use str;
use vec::Vec; use vec::Vec;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::buffered::{BufReader, BufWriter, LineWriter}; pub use self::buffered::{BufReader, BufWriter, LineWriter};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::buffered::IntoInnerError; pub use self::buffered::IntoInnerError;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::cursor::Cursor; pub use self::cursor::Cursor;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::error::{Result, Error, ErrorKind}; pub use self::error::{Result, Error, ErrorKind};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::util::{copy, sink, Sink, empty, Empty, repeat, Repeat}; pub use self::util::{copy, sink, Sink, empty, Empty, repeat, Repeat};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::stdio::{stdin, stdout, stderr, _print, Stdin, Stdout, Stderr}; pub use self::stdio::{stdin, stdout, stderr, _print, Stdin, Stdout, Stderr};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::stdio::{StdoutLock, StderrLock, StdinLock}; pub use self::stdio::{StdoutLock, StderrLock, StdinLock};
#[unstable(feature = "libstd_io_internals", issue = "0")]
#[doc(no_inline, hidden)] #[doc(no_inline, hidden)]
pub use self::stdio::{set_panic, set_print}; pub use self::stdio::{set_panic, set_print};

View File

@ -20,6 +20,8 @@
#![stable(feature = "rust1", since = "1.0.0")] #![stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub use super::{Read, Write, BufRead, Seek}; pub use super::{Read, Write, BufRead, Seek};
#[allow(deprecated)] #[allow(deprecated)]
#[unstable(feature = "path_ext_deprecated", issue = "27725")]
pub use fs::PathExt; pub use fs::PathExt;

View File

@ -303,36 +303,63 @@ extern crate libc;
// NB: These reexports are in the order they should be listed in rustdoc // NB: These reexports are in the order they should be listed in rustdoc
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::any; pub use core::any;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::cell; pub use core::cell;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::clone; pub use core::clone;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::cmp; pub use core::cmp;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::convert; pub use core::convert;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::default; pub use core::default;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::hash; pub use core::hash;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::intrinsics; pub use core::intrinsics;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::iter; pub use core::iter;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::marker; pub use core::marker;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::mem; pub use core::mem;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::ops; pub use core::ops;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::ptr; pub use core::ptr;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::raw; pub use core::raw;
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated)] #[allow(deprecated)]
pub use core::simd; pub use core::simd;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::result; pub use core::result;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::option; pub use core::option;
pub mod error; pub mod error;
#[stable(feature = "rust1", since = "1.0.0")]
pub use alloc::boxed; pub use alloc::boxed;
#[stable(feature = "rust1", since = "1.0.0")]
pub use alloc::rc; pub use alloc::rc;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::borrow; pub use core_collections::borrow;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::fmt; pub use core_collections::fmt;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::slice; pub use core_collections::slice;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::str; pub use core_collections::str;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::string; pub use core_collections::string;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core_collections::vec; pub use core_collections::vec;
#[stable(feature = "rust1", since = "1.0.0")]
pub use rustc_unicode::char; pub use rustc_unicode::char;
/* Exported macros */ /* Exported macros */
@ -353,16 +380,26 @@ pub mod prelude;
// doc pages are inlined from the public re-exports of core_collections::{slice, // doc pages are inlined from the public re-exports of core_collections::{slice,
// str} above. // str} above.
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::isize; pub use core::isize;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::i8; pub use core::i8;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::i16; pub use core::i16;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::i32; pub use core::i32;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::i64; pub use core::i64;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::usize; pub use core::usize;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::u8; pub use core::u8;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::u16; pub use core::u16;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::u32; pub use core::u32;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::u64; pub use core::u64;
#[path = "num/f32.rs"] pub mod f32; #[path = "num/f32.rs"] pub mod f32;

View File

@ -259,6 +259,7 @@ pub mod builtin {
/// assert_eq!(s, format!("hello {}", "world")); /// assert_eq!(s, format!("hello {}", "world"));
/// ///
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! format_args { ($fmt:expr, $($args:tt)*) => ({ macro_rules! format_args { ($fmt:expr, $($args:tt)*) => ({
/* compiler built-in */ /* compiler built-in */
@ -279,6 +280,7 @@ pub mod builtin {
/// let path: &'static str = env!("PATH"); /// let path: &'static str = env!("PATH");
/// println!("the $PATH variable at the time of compiling was: {}", path); /// println!("the $PATH variable at the time of compiling was: {}", path);
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! env { ($name:expr) => ({ /* compiler built-in */ }) } macro_rules! env { ($name:expr) => ({ /* compiler built-in */ }) }
@ -298,6 +300,7 @@ pub mod builtin {
/// let key: Option<&'static str> = option_env!("SECRET_KEY"); /// let key: Option<&'static str> = option_env!("SECRET_KEY");
/// println!("the secret key might be: {:?}", key); /// println!("the secret key might be: {:?}", key);
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! option_env { ($name:expr) => ({ /* compiler built-in */ }) } macro_rules! option_env { ($name:expr) => ({ /* compiler built-in */ }) }
@ -322,6 +325,7 @@ pub mod builtin {
/// println!("{}", f()); /// println!("{}", f());
/// # } /// # }
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! concat_idents { macro_rules! concat_idents {
($($e:ident),*) => ({ /* compiler built-in */ }) ($($e:ident),*) => ({ /* compiler built-in */ })
@ -342,6 +346,7 @@ pub mod builtin {
/// let s = concat!("test", 10, 'b', true); /// let s = concat!("test", 10, 'b', true);
/// assert_eq!(s, "test10btrue"); /// assert_eq!(s, "test10btrue");
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! concat { ($($e:expr),*) => ({ /* compiler built-in */ }) } macro_rules! concat { ($($e:expr),*) => ({ /* compiler built-in */ }) }
@ -357,6 +362,7 @@ pub mod builtin {
/// let current_line = line!(); /// let current_line = line!();
/// println!("defined on line: {}", current_line); /// println!("defined on line: {}", current_line);
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! line { () => ({ /* compiler built-in */ }) } macro_rules! line { () => ({ /* compiler built-in */ }) }
@ -372,6 +378,7 @@ pub mod builtin {
/// let current_col = column!(); /// let current_col = column!();
/// println!("defined on column: {}", current_col); /// println!("defined on column: {}", current_col);
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! column { () => ({ /* compiler built-in */ }) } macro_rules! column { () => ({ /* compiler built-in */ }) }
@ -388,6 +395,7 @@ pub mod builtin {
/// let this_file = file!(); /// let this_file = file!();
/// println!("defined in file: {}", this_file); /// println!("defined in file: {}", this_file);
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! file { () => ({ /* compiler built-in */ }) } macro_rules! file { () => ({ /* compiler built-in */ }) }
@ -403,6 +411,7 @@ pub mod builtin {
/// let one_plus_one = stringify!(1 + 1); /// let one_plus_one = stringify!(1 + 1);
/// assert_eq!(one_plus_one, "1 + 1"); /// assert_eq!(one_plus_one, "1 + 1");
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! stringify { ($t:tt) => ({ /* compiler built-in */ }) } macro_rules! stringify { ($t:tt) => ({ /* compiler built-in */ }) }
@ -417,6 +426,7 @@ pub mod builtin {
/// ```rust,ignore /// ```rust,ignore
/// let secret_key = include_str!("secret-key.ascii"); /// let secret_key = include_str!("secret-key.ascii");
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) } macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) }
@ -431,6 +441,7 @@ pub mod builtin {
/// ```rust,ignore /// ```rust,ignore
/// let secret_key = include_bytes!("secret-key.bin"); /// let secret_key = include_bytes!("secret-key.bin");
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! include_bytes { ($file:expr) => ({ /* compiler built-in */ }) } macro_rules! include_bytes { ($file:expr) => ({ /* compiler built-in */ }) }
@ -451,6 +462,7 @@ pub mod builtin {
/// ///
/// test::foo(); /// test::foo();
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! module_path { () => ({ /* compiler built-in */ }) } macro_rules! module_path { () => ({ /* compiler built-in */ }) }
@ -472,6 +484,7 @@ pub mod builtin {
/// "unix-directory" /// "unix-directory"
/// }; /// };
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! cfg { ($cfg:tt) => ({ /* compiler built-in */ }) } macro_rules! cfg { ($cfg:tt) => ({ /* compiler built-in */ }) }
@ -486,6 +499,7 @@ pub mod builtin {
/// include!("/path/to/a/file") /// include!("/path/to/a/file")
/// } /// }
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! include { ($cfg:tt) => ({ /* compiler built-in */ }) } macro_rules! include { ($cfg:tt) => ({ /* compiler built-in */ }) }
} }

View File

@ -448,6 +448,7 @@ impl ToSocketAddrs for str {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T: ToSocketAddrs + ?Sized> ToSocketAddrs for &'a T { impl<'a, T: ToSocketAddrs + ?Sized> ToSocketAddrs for &'a T {
type Iter = T::Iter; type Iter = T::Iter;
fn to_socket_addrs(&self) -> io::Result<T::Iter> { fn to_socket_addrs(&self) -> io::Result<T::Iter> {

View File

@ -17,10 +17,15 @@ use prelude::v1::*;
use io::{self, Error, ErrorKind}; use io::{self, Error, ErrorKind};
use sys_common::net as net_imp; use sys_common::net as net_imp;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope}; pub use self::ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::addr::{SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs}; pub use self::addr::{SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::tcp::{TcpStream, TcpListener, Incoming}; pub use self::tcp::{TcpStream, TcpListener, Incoming};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::udp::UdpSocket; pub use self::udp::UdpSocket;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::parser::AddrParseError; pub use self::parser::AddrParseError;
mod ip; mod ip;

View File

@ -219,6 +219,7 @@ impl IntoInner<net_imp::TcpStream> for TcpStream {
fn into_inner(self) -> net_imp::TcpStream { self.0 } fn into_inner(self) -> net_imp::TcpStream { self.0 }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for TcpStream { impl fmt::Debug for TcpStream {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f) self.0.fmt(f)
@ -301,6 +302,7 @@ impl IntoInner<net_imp::TcpListener> for TcpListener {
fn into_inner(self) -> net_imp::TcpListener { self.0 } fn into_inner(self) -> net_imp::TcpListener { self.0 }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for TcpListener { impl fmt::Debug for TcpListener {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f) self.0.fmt(f)

View File

@ -153,6 +153,7 @@ impl IntoInner<net_imp::UdpSocket> for UdpSocket {
fn into_inner(self) -> net_imp::UdpSocket { self.0 } fn into_inner(self) -> net_imp::UdpSocket { self.0 }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Debug for UdpSocket { impl fmt::Debug for UdpSocket {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f) self.0.fmt(f)

View File

@ -20,10 +20,15 @@ use intrinsics;
use libc::c_int; use libc::c_int;
use num::{FpCategory, ParseFloatError}; use num::{FpCategory, ParseFloatError};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON}; pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f32::{MIN_EXP, MAX_EXP, MIN_10_EXP}; pub use core::f32::{MIN_EXP, MAX_EXP, MIN_10_EXP};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f32::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY}; pub use core::f32::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f32::{MIN, MIN_POSITIVE, MAX}; pub use core::f32::{MIN, MIN_POSITIVE, MAX};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f32::consts; pub use core::f32::consts;
#[allow(dead_code)] #[allow(dead_code)]

View File

@ -20,10 +20,15 @@ use intrinsics;
use libc::c_int; use libc::c_int;
use num::{FpCategory, ParseFloatError}; use num::{FpCategory, ParseFloatError};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON}; pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f64::{MIN_EXP, MAX_EXP, MIN_10_EXP}; pub use core::f64::{MIN_EXP, MAX_EXP, MIN_10_EXP};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f64::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY}; pub use core::f64::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f64::{MIN, MIN_POSITIVE, MAX}; pub use core::f64::{MIN, MIN_POSITIVE, MAX};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::f64::consts; pub use core::f64::consts;
#[allow(dead_code)] #[allow(dead_code)]

View File

@ -16,8 +16,11 @@
#![stable(feature = "rust1", since = "1.0.0")] #![stable(feature = "rust1", since = "1.0.0")]
#![allow(missing_docs)] #![allow(missing_docs)]
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::num::{Zero, One}; pub use core::num::{Zero, One};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::num::{FpCategory, ParseIntError, ParseFloatError}; pub use core::num::{FpCategory, ParseIntError, ParseFloatError};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::num::{wrapping, Wrapping}; pub use core::num::{wrapping, Wrapping};
#[cfg(test)] use cmp::PartialEq; #[cfg(test)] use cmp::PartialEq;

View File

@ -14,7 +14,8 @@
pub mod raw; pub mod raw;
#[stable(feature = "raw_ext", since = "1.1.0")]
pub mod fs { pub mod fs {
#![stable(feature = "raw_ext", since = "1.1.0")] #[stable(feature = "raw_ext", since = "1.1.0")]
pub use sys::fs::MetadataExt; pub use sys::fs::MetadataExt;
} }

View File

@ -16,6 +16,7 @@
#[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32; #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
#[doc(inline)] #[doc(inline)]
#[stable(feature = "raw_ext", since = "1.1.0")]
pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t}; pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
#[cfg(any(target_arch = "x86", #[cfg(any(target_arch = "x86",

View File

@ -13,8 +13,12 @@
#![stable(feature = "os", since = "1.0.0")] #![stable(feature = "os", since = "1.0.0")]
#![allow(missing_docs, bad_style)] #![allow(missing_docs, bad_style)]
#[cfg(unix)] pub use sys::ext as unix; #[cfg(unix)]
#[cfg(windows)] pub use sys::ext as windows; #[stable(feature = "rust1", since = "1.0.0")]
pub use sys::ext as unix;
#[cfg(windows)]
#[stable(feature = "rust1", since = "1.0.0")]
pub use sys::ext as windows;
#[cfg(target_os = "android")] pub mod android; #[cfg(target_os = "android")] pub mod android;
#[cfg(target_os = "bitrig")] pub mod bitrig; #[cfg(target_os = "bitrig")] pub mod bitrig;

View File

@ -46,6 +46,7 @@ struct BarrierState {
/// ///
/// Currently this opaque structure only has one method, `.is_leader()`. Only /// Currently this opaque structure only has one method, `.is_leader()`. Only
/// one thread will receive a result that will return `true` from this function. /// one thread will receive a result that will return `true` from this function.
#[stable(feature = "rust1", since = "1.0.0")]
pub struct BarrierWaitResult(bool); pub struct BarrierWaitResult(bool);
impl Barrier { impl Barrier {

View File

@ -17,17 +17,28 @@
#![stable(feature = "rust1", since = "1.0.0")] #![stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "rust1", since = "1.0.0")]
pub use alloc::arc::{Arc, Weak}; pub use alloc::arc::{Arc, Weak};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::sync::atomic; pub use core::sync::atomic;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::barrier::{Barrier, BarrierWaitResult}; pub use self::barrier::{Barrier, BarrierWaitResult};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::condvar::{Condvar, StaticCondvar, WaitTimeoutResult, CONDVAR_INIT}; pub use self::condvar::{Condvar, StaticCondvar, WaitTimeoutResult, CONDVAR_INIT};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::mutex::MUTEX_INIT; pub use self::mutex::MUTEX_INIT;
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::mutex::{Mutex, MutexGuard, StaticMutex}; pub use self::mutex::{Mutex, MutexGuard, StaticMutex};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::once::{Once, ONCE_INIT}; pub use self::once::{Once, ONCE_INIT};
#[stable(feature = "rust1", since = "1.0.0")]
pub use sys_common::poison::{PoisonError, TryLockError, TryLockResult, LockResult}; pub use sys_common::poison::{PoisonError, TryLockError, TryLockResult, LockResult};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::rwlock::{RwLockReadGuard, RwLockWriteGuard}; pub use self::rwlock::{RwLockReadGuard, RwLockWriteGuard};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::rwlock::{RwLock, StaticRwLock, RW_LOCK_INIT}; pub use self::rwlock::{RwLock, StaticRwLock, RW_LOCK_INIT};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::semaphore::{Semaphore, SemaphoreGuard}; pub use self::semaphore::{Semaphore, SemaphoreGuard};
pub mod mpsc; pub mod mpsc;

View File

@ -272,6 +272,7 @@ use mem;
use cell::UnsafeCell; use cell::UnsafeCell;
use marker::Reflect; use marker::Reflect;
#[unstable(feature = "mpsc_select", issue = "27800")]
pub use self::select::{Select, Handle}; pub use self::select::{Select, Handle};
use self::select::StartResult; use self::select::StartResult;
use self::select::StartResult::*; use self::select::StartResult::*;
@ -295,6 +296,7 @@ pub struct Receiver<T> {
// The receiver port can be sent from place to place, so long as it // The receiver port can be sent from place to place, so long as it
// is not used to receive non-sendable things. // is not used to receive non-sendable things.
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: Send> Send for Receiver<T> { } unsafe impl<T: Send> Send for Receiver<T> { }
/// An iterator over messages on a receiver, this iterator will block /// An iterator over messages on a receiver, this iterator will block
@ -322,6 +324,7 @@ pub struct Sender<T> {
// The send port can be sent from place to place, so long as it // The send port can be sent from place to place, so long as it
// is not used to send non-sendable things. // is not used to send non-sendable things.
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: Send> Send for Sender<T> { } unsafe impl<T: Send> Send for Sender<T> { }
/// The sending-half of Rust's synchronous channel type. This half can only be /// The sending-half of Rust's synchronous channel type. This half can only be
@ -331,8 +334,10 @@ pub struct SyncSender<T> {
inner: Arc<UnsafeCell<sync::Packet<T>>>, inner: Arc<UnsafeCell<sync::Packet<T>>>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: Send> Send for SyncSender<T> {} unsafe impl<T: Send> Send for SyncSender<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> !Sync for SyncSender<T> {} impl<T> !Sync for SyncSender<T> {}
/// An error returned from the `send` function on channels. /// An error returned from the `send` function on channels.
@ -954,6 +959,7 @@ impl<'a, T> IntoIterator for &'a Receiver<T> {
fn into_iter(self) -> Iter<'a, T> { self.iter() } fn into_iter(self) -> Iter<'a, T> { self.iter() }
} }
#[stable(feature = "receiver_into_iter", since = "1.1.0")]
impl<T> Iterator for IntoIter<T> { impl<T> Iterator for IntoIter<T> {
type Item = T; type Item = T;
fn next(&mut self) -> Option<T> { self.rx.recv().ok() } fn next(&mut self) -> Option<T> { self.rx.recv().ok() }

View File

@ -133,7 +133,6 @@ impl<T> Queue<T> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> Drop for Queue<T> { impl<T> Drop for Queue<T> {
fn drop(&mut self) { fn drop(&mut self) {
unsafe { unsafe {

View File

@ -125,8 +125,9 @@ pub struct Mutex<T: ?Sized> {
// these are the only places where `T: Send` matters; all other // these are the only places where `T: Send` matters; all other
// functionality works fine on a single thread. // functionality works fine on a single thread.
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Send> Send for Mutex<T> { } unsafe impl<T: ?Sized + Send> Send for Mutex<T> { }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Send> Sync for Mutex<T> { } unsafe impl<T: ?Sized + Send> Sync for Mutex<T> { }
/// The static mutex type is provided to allow for static allocation of mutexes. /// The static mutex type is provided to allow for static allocation of mutexes.
@ -175,6 +176,7 @@ pub struct MutexGuard<'a, T: ?Sized + 'a> {
__poison: poison::Guard, __poison: poison::Guard,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T: ?Sized> !marker::Send for MutexGuard<'a, T> {} impl<'a, T: ?Sized> !marker::Send for MutexGuard<'a, T> {}
/// Static initialization of a mutex. This constant can be used to initialize /// Static initialization of a mutex. This constant can be used to initialize

View File

@ -71,7 +71,9 @@ pub struct RwLock<T: ?Sized> {
data: UnsafeCell<T>, data: UnsafeCell<T>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Send + Sync> Send for RwLock<T> {} unsafe impl<T: ?Sized + Send + Sync> Send for RwLock<T> {}
#[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {} unsafe impl<T: ?Sized + Send + Sync> Sync for RwLock<T> {}
/// Structure representing a statically allocated RwLock. /// Structure representing a statically allocated RwLock.
@ -122,6 +124,7 @@ pub struct RwLockReadGuard<'a, T: ?Sized + 'a> {
__data: &'a UnsafeCell<T>, __data: &'a UnsafeCell<T>,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T: ?Sized> !marker::Send for RwLockReadGuard<'a, T> {} impl<'a, T: ?Sized> !marker::Send for RwLockReadGuard<'a, T> {}
/// RAII structure used to release the exclusive write access of a lock when /// RAII structure used to release the exclusive write access of a lock when
@ -134,6 +137,7 @@ pub struct RwLockWriteGuard<'a, T: ?Sized + 'a> {
__poison: poison::Guard, __poison: poison::Guard,
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, T: ?Sized> !marker::Send for RwLockWriteGuard<'a, T> {} impl<'a, T: ?Sized> !marker::Send for RwLockWriteGuard<'a, T> {}
impl<T> RwLock<T> { impl<T> RwLock<T> {

View File

@ -110,6 +110,7 @@ impl<T> fmt::Display for PoisonError<T> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Send + Reflect> Error for PoisonError<T> { impl<T: Send + Reflect> Error for PoisonError<T> {
fn description(&self) -> &str { fn description(&self) -> &str {
"poisoned lock: another task failed inside" "poisoned lock: another task failed inside"
@ -139,6 +140,7 @@ impl<T> PoisonError<T> {
pub fn get_mut(&mut self) -> &mut T { &mut self.guard } pub fn get_mut(&mut self) -> &mut T { &mut self.guard }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T> From<PoisonError<T>> for TryLockError<T> { impl<T> From<PoisonError<T>> for TryLockError<T> {
fn from(err: PoisonError<T>) -> TryLockError<T> { fn from(err: PoisonError<T>) -> TryLockError<T> {
TryLockError::Poisoned(err) TryLockError::Poisoned(err)
@ -162,6 +164,7 @@ impl<T: Send + Reflect> fmt::Display for TryLockError<T> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Send + Reflect> Error for TryLockError<T> { impl<T: Send + Reflect> Error for TryLockError<T> {
fn description(&self) -> &str { fn description(&self) -> &str {
match *self { match *self {

View File

@ -203,6 +203,9 @@ pub extern fn rust_begin_unwind(msg: fmt::Arguments,
/// site as much as possible (so that `panic!()` has as low an impact /// site as much as possible (so that `panic!()` has as low an impact
/// on (e.g.) the inlining of other functions as possible), by moving /// on (e.g.) the inlining of other functions as possible), by moving
/// the actual formatting into this shared place. /// the actual formatting into this shared place.
#[unstable(feature = "libstd_sys_internals",
reason = "used by the panic! macro",
issue = "0")]
#[inline(never)] #[cold] #[inline(never)] #[cold]
pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, u32)) -> ! { pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, u32)) -> ! {
use fmt::Write; use fmt::Write;
@ -218,6 +221,9 @@ pub fn begin_unwind_fmt(msg: fmt::Arguments, file_line: &(&'static str, u32)) ->
} }
/// This is the entry point of unwinding for panic!() and assert!(). /// This is the entry point of unwinding for panic!() and assert!().
#[unstable(feature = "libstd_sys_internals",
reason = "used by the panic! macro",
issue = "0")]
#[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible #[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible
pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, u32)) -> ! { pub fn begin_unwind<M: Any + Send>(msg: M, file_line: &(&'static str, u32)) -> ! {
// Note that this should be the only allocation performed in this code path. // Note that this should be the only allocation performed in this code path.

View File

@ -715,6 +715,7 @@ impl<'a> Iterator for Wtf8CodePoints<'a> {
} }
} }
#[stable(feature = "rust1", since = "1.0.0")]
#[derive(Clone)] #[derive(Clone)]
pub struct EncodeWide<'a> { pub struct EncodeWide<'a> {
code_points: Wtf8CodePoints<'a>, code_points: Wtf8CodePoints<'a>,
@ -722,6 +723,7 @@ pub struct EncodeWide<'a> {
} }
// Copied from libunicode/u_str.rs // Copied from libunicode/u_str.rs
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a> Iterator for EncodeWide<'a> { impl<'a> Iterator for EncodeWide<'a> {
type Item = u16; type Item = u16;

View File

@ -153,6 +153,7 @@ pub trait MetadataExt {
fn blocks(&self) -> raw::blkcnt_t; fn blocks(&self) -> raw::blkcnt_t;
} }
#[stable(feature = "metadata_ext", since = "1.1.0")]
impl MetadataExt for fs::Metadata { impl MetadataExt for fs::Metadata {
fn dev(&self) -> raw::dev_t { self.as_raw_stat().st_dev as raw::dev_t } fn dev(&self) -> raw::dev_t { self.as_raw_stat().st_dev as raw::dev_t }
fn ino(&self) -> raw::ino_t { self.as_raw_stat().st_ino as raw::ino_t } fn ino(&self) -> raw::ino_t { self.as_raw_stat().st_ino as raw::ino_t }
@ -211,6 +212,7 @@ pub trait DirEntryExt {
fn ino(&self) -> raw::ino_t; fn ino(&self) -> raw::ino_t;
} }
#[stable(feature = "dir_entry_ext", since = "1.1.0")]
impl DirEntryExt for fs::DirEntry { impl DirEntryExt for fs::DirEntry {
fn ino(&self) -> raw::ino_t { self.as_inner().ino() } fn ino(&self) -> raw::ino_t { self.as_inner().ino() }
} }
@ -253,6 +255,8 @@ pub trait DirBuilderExt {
fn mode(&mut self, mode: raw::mode_t) -> &mut Self; fn mode(&mut self, mode: raw::mode_t) -> &mut Self;
} }
#[unstable(feature = "dir_builder", reason = "recently added API",
issue = "27710")]
impl DirBuilderExt for fs::DirBuilder { impl DirBuilderExt for fs::DirBuilder {
fn mode(&mut self, mode: raw::mode_t) -> &mut fs::DirBuilder { fn mode(&mut self, mode: raw::mode_t) -> &mut fs::DirBuilder {
self.as_inner_mut().set_mode(mode); self.as_inner_mut().set_mode(mode);

View File

@ -40,13 +40,13 @@ pub mod raw;
/// Includes all extension traits, and some important type definitions. /// Includes all extension traits, and some important type definitions.
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub mod prelude { pub mod prelude {
#[doc(no_inline)] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::io::{RawFd, AsRawFd, FromRawFd, IntoRawFd}; pub use super::io::{RawFd, AsRawFd, FromRawFd, IntoRawFd};
#[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::ffi::{OsStrExt, OsStringExt}; pub use super::ffi::{OsStrExt, OsStringExt};
#[doc(no_inline)] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::fs::{PermissionsExt, OpenOptionsExt, MetadataExt, FileTypeExt}; pub use super::fs::{PermissionsExt, OpenOptionsExt, MetadataExt, FileTypeExt};
#[doc(no_inline)] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::fs::{DirEntryExt}; pub use super::fs::{DirEntryExt};
#[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::process::{CommandExt, ExitStatusExt}; pub use super::process::{CommandExt, ExitStatusExt};

View File

@ -107,18 +107,21 @@ impl AsRawFd for process::ChildStderr {
} }
} }
#[stable(feature = "process_extensions", since = "1.2.0")]
impl IntoRawFd for process::ChildStdin { impl IntoRawFd for process::ChildStdin {
fn into_raw_fd(self) -> RawFd { fn into_raw_fd(self) -> RawFd {
self.into_inner().into_fd().into_raw() self.into_inner().into_fd().into_raw()
} }
} }
#[stable(feature = "process_extensions", since = "1.2.0")]
impl IntoRawFd for process::ChildStdout { impl IntoRawFd for process::ChildStdout {
fn into_raw_fd(self) -> RawFd { fn into_raw_fd(self) -> RawFd {
self.into_inner().into_fd().into_raw() self.into_inner().into_fd().into_raw()
} }
} }
#[stable(feature = "process_extensions", since = "1.2.0")]
impl IntoRawFd for process::ChildStderr { impl IntoRawFd for process::ChildStderr {
fn into_raw_fd(self) -> RawFd { fn into_raw_fd(self) -> RawFd {
self.into_inner().into_fd().into_raw() self.into_inner().into_fd().into_raw()

View File

@ -17,6 +17,8 @@
#[stable(feature = "raw_ext", since = "1.1.0")] pub type pid_t = i32; #[stable(feature = "raw_ext", since = "1.1.0")] pub type pid_t = i32;
#[doc(inline)] #[doc(inline)]
#[stable(feature = "raw_ext", since = "1.1.0")]
pub use sys::platform::raw::{dev_t, ino_t, mode_t, nlink_t, off_t, blksize_t}; pub use sys::platform::raw::{dev_t, ino_t, mode_t, nlink_t, off_t, blksize_t};
#[doc(inline)] #[doc(inline)]
#[stable(feature = "raw_ext", since = "1.1.0")]
pub use sys::platform::raw::{blkcnt_t, time_t}; pub use sys::platform::raw::{blkcnt_t, time_t};

View File

@ -98,6 +98,7 @@ mod inner {
} }
} }
#[unstable(feature = "libstd_sys_internals", issue = "0")]
impl<'a> Sub for &'a SteadyTime { impl<'a> Sub for &'a SteadyTime {
type Output = Duration; type Output = Duration;

View File

@ -17,6 +17,7 @@ use sys::os_str::Buf;
use sys_common::wtf8::Wtf8Buf; use sys_common::wtf8::Wtf8Buf;
use sys_common::{FromInner, AsInner}; use sys_common::{FromInner, AsInner};
#[stable(feature = "rust1", since = "1.0.0")]
pub use sys_common::wtf8::EncodeWide; pub use sys_common::wtf8::EncodeWide;
/// Windows-specific extensions to `OsString`. /// Windows-specific extensions to `OsString`.

View File

@ -49,6 +49,9 @@ pub trait OpenOptionsExt {
fn share_mode(&mut self, val: u32) -> &mut Self; fn share_mode(&mut self, val: u32) -> &mut Self;
} }
#[unstable(feature = "open_options_ext",
reason = "may require more thought/methods",
issue = "27720")]
impl OpenOptionsExt for OpenOptions { impl OpenOptionsExt for OpenOptions {
fn desired_access(&mut self, access: u32) -> &mut OpenOptions { fn desired_access(&mut self, access: u32) -> &mut OpenOptions {
self.as_inner_mut().desired_access(access); self self.as_inner_mut().desired_access(access); self

View File

@ -27,12 +27,12 @@ pub mod process;
/// Includes all extension traits, and some important type definitions. /// Includes all extension traits, and some important type definitions.
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub mod prelude { pub mod prelude {
#[doc(no_inline)] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::io::{RawSocket, RawHandle, AsRawSocket, AsRawHandle}; pub use super::io::{RawSocket, RawHandle, AsRawSocket, AsRawHandle};
#[doc(no_inline)] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::io::{FromRawSocket, FromRawHandle, IntoRawSocket, IntoRawHandle}; pub use super::io::{FromRawSocket, FromRawHandle, IntoRawSocket, IntoRawHandle};
#[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::ffi::{OsStrExt, OsStringExt}; pub use super::ffi::{OsStrExt, OsStringExt};
#[doc(no_inline)] #[doc(no_inline)] #[stable(feature = "rust1", since = "1.0.0")]
pub use super::fs::{OpenOptionsExt, MetadataExt}; pub use super::fs::{OpenOptionsExt, MetadataExt};
} }

View File

@ -32,6 +32,7 @@ impl AsRawHandle for process::Child {
} }
} }
#[stable(feature = "process_extensions", since = "1.2.0")]
impl IntoRawHandle for process::Child { impl IntoRawHandle for process::Child {
fn into_raw_handle(self) -> RawHandle { fn into_raw_handle(self) -> RawHandle {
self.into_inner().into_handle().into_raw() as *mut _ self.into_inner().into_handle().into_raw() as *mut _
@ -59,18 +60,21 @@ impl AsRawHandle for process::ChildStderr {
} }
} }
#[stable(feature = "process_extensions", since = "1.2.0")]
impl IntoRawHandle for process::ChildStdin { impl IntoRawHandle for process::ChildStdin {
fn into_raw_handle(self) -> RawHandle { fn into_raw_handle(self) -> RawHandle {
self.into_inner().into_handle().into_raw() as *mut _ self.into_inner().into_handle().into_raw() as *mut _
} }
} }
#[stable(feature = "process_extensions", since = "1.2.0")]
impl IntoRawHandle for process::ChildStdout { impl IntoRawHandle for process::ChildStdout {
fn into_raw_handle(self) -> RawHandle { fn into_raw_handle(self) -> RawHandle {
self.into_inner().into_handle().into_raw() as *mut _ self.into_inner().into_handle().into_raw() as *mut _
} }
} }
#[stable(feature = "process_extensions", since = "1.2.0")]
impl IntoRawHandle for process::ChildStderr { impl IntoRawHandle for process::ChildStderr {
fn into_raw_handle(self) -> RawHandle { fn into_raw_handle(self) -> RawHandle {
self.into_inner().into_handle().into_raw() as *mut _ self.into_inner().into_handle().into_raw() as *mut _

View File

@ -39,6 +39,7 @@ fn frequency() -> c::LARGE_INTEGER {
} }
} }
#[unstable(feature = "libstd_sys_internals", issue = "0")]
impl<'a> Sub for &'a SteadyTime { impl<'a> Sub for &'a SteadyTime {
type Output = Duration; type Output = Duration;

View File

@ -189,7 +189,9 @@ pub use self::local::{LocalKey, LocalKeyState};
issue = "27715")] issue = "27715")]
pub use self::scoped_tls::ScopedKey; pub use self::scoped_tls::ScopedKey;
#[unstable(feature = "libstd_thread_internals", issue = "0")]
#[doc(hidden)] pub use self::local::__KeyInner as __LocalKeyInner; #[doc(hidden)] pub use self::local::__KeyInner as __LocalKeyInner;
#[unstable(feature = "libstd_thread_internals", issue = "0")]
#[doc(hidden)] pub use self::scoped_tls::__KeyInner as __ScopedKeyInner; #[doc(hidden)] pub use self::scoped_tls::__KeyInner as __ScopedKeyInner;
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View File

@ -65,6 +65,9 @@ pub struct ScopedKey<T:'static> { inner: fn() -> &'static imp::KeyInner<T> }
/// ///
/// See [ScopedKey documentation](thread/struct.ScopedKey.html) for more /// See [ScopedKey documentation](thread/struct.ScopedKey.html) for more
/// information. /// information.
#[unstable(feature = "thread_local_internals",
reason = "should not be necessary",
issue = "0")]
#[macro_export] #[macro_export]
#[allow_internal_unstable] #[allow_internal_unstable]
macro_rules! scoped_thread_local { macro_rules! scoped_thread_local {
@ -80,7 +83,8 @@ macro_rules! scoped_thread_local {
#[doc(hidden)] #[doc(hidden)]
#[unstable(feature = "thread_local_internals", #[unstable(feature = "thread_local_internals",
reason = "should not be necessary")] reason = "should not be necessary",
issue = "0")]
#[macro_export] #[macro_export]
#[allow_internal_unstable] #[allow_internal_unstable]
#[cfg(no_elf_tls)] #[cfg(no_elf_tls)]
@ -95,7 +99,8 @@ macro_rules! __scoped_thread_local_inner {
#[doc(hidden)] #[doc(hidden)]
#[unstable(feature = "thread_local_internals", #[unstable(feature = "thread_local_internals",
reason = "should not be necessary")] reason = "should not be necessary",
issue = "0")]
#[macro_export] #[macro_export]
#[allow_internal_unstable] #[allow_internal_unstable]
#[cfg(not(no_elf_tls))] #[cfg(not(no_elf_tls))]

View File

@ -102,6 +102,7 @@ impl Duration {
pub fn subsec_nanos(&self) -> u32 { self.nanos } pub fn subsec_nanos(&self) -> u32 { self.nanos }
} }
#[stable(feature = "duration", since = "1.3.0")]
impl Add for Duration { impl Add for Duration {
type Output = Duration; type Output = Duration;
@ -118,6 +119,7 @@ impl Add for Duration {
} }
} }
#[stable(feature = "duration", since = "1.3.0")]
impl Sub for Duration { impl Sub for Duration {
type Output = Duration; type Output = Duration;
@ -136,6 +138,7 @@ impl Sub for Duration {
} }
} }
#[stable(feature = "duration", since = "1.3.0")]
impl Mul<u32> for Duration { impl Mul<u32> for Duration {
type Output = Duration; type Output = Duration;
@ -152,6 +155,7 @@ impl Mul<u32> for Duration {
} }
} }
#[stable(feature = "duration", since = "1.3.0")]
impl Div<u32> for Duration { impl Div<u32> for Duration {
type Output = Duration; type Output = Duration;

View File

@ -12,6 +12,7 @@
#![stable(feature = "time", since = "1.3.0")] #![stable(feature = "time", since = "1.3.0")]
#[stable(feature = "time", since = "1.3.0")]
pub use self::duration::Duration; pub use self::duration::Duration;
mod duration; mod duration;

View File

@ -20,6 +20,7 @@ pub fn stable() {}
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub mod stable_mod { pub mod stable_mod {
#[unstable(feature = "test_feature", issue = "0")]
pub fn unstable() {} pub fn unstable() {}
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
@ -37,6 +38,7 @@ pub mod unstable_mod {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub trait Stable { pub trait Stable {
#[unstable(feature = "test_feature", issue = "0")]
fn unstable(&self); fn unstable(&self);
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]

View File

@ -33,12 +33,14 @@ pub struct Bar {
pub x: u8 pub x: u8
} }
#[stable(feature = "stable", since = "1.0.0")]
#[allow_internal_unstable] #[allow_internal_unstable]
#[macro_export] #[macro_export]
macro_rules! call_unstable_allow { macro_rules! call_unstable_allow {
() => { $crate::unstable() } () => { $crate::unstable() }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[allow_internal_unstable] #[allow_internal_unstable]
#[macro_export] #[macro_export]
macro_rules! construct_unstable_allow { macro_rules! construct_unstable_allow {
@ -47,29 +49,34 @@ macro_rules! construct_unstable_allow {
} }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[allow_internal_unstable] #[allow_internal_unstable]
#[macro_export] #[macro_export]
macro_rules! call_method_allow { macro_rules! call_method_allow {
($e: expr) => { $e.method() } ($e: expr) => { $e.method() }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[allow_internal_unstable] #[allow_internal_unstable]
#[macro_export] #[macro_export]
macro_rules! access_field_allow { macro_rules! access_field_allow {
($e: expr) => { $e.x } ($e: expr) => { $e.x }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[allow_internal_unstable] #[allow_internal_unstable]
#[macro_export] #[macro_export]
macro_rules! pass_through_allow { macro_rules! pass_through_allow {
($e: expr) => { $e } ($e: expr) => { $e }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! call_unstable_noallow { macro_rules! call_unstable_noallow {
() => { $crate::unstable() } () => { $crate::unstable() }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! construct_unstable_noallow { macro_rules! construct_unstable_noallow {
($e: expr) => { ($e: expr) => {
@ -77,16 +84,19 @@ macro_rules! construct_unstable_noallow {
} }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! call_method_noallow { macro_rules! call_method_noallow {
($e: expr) => { $e.method() } ($e: expr) => { $e.method() }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! access_field_noallow { macro_rules! access_field_noallow {
($e: expr) => { $e.x } ($e: expr) => { $e.x }
} }
#[stable(feature = "stable", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! pass_through_noallow { macro_rules! pass_through_noallow {
($e: expr) => { $e } ($e: expr) => { $e }

View File

@ -93,6 +93,7 @@ pub trait Trait {
fn trait_stable_text(&self) {} fn trait_stable_text(&self) {}
} }
#[stable(feature = "test_feature", since = "1.0.0")]
impl Trait for MethodTester {} impl Trait for MethodTester {}
#[unstable(feature = "test_feature", issue = "0")] #[unstable(feature = "test_feature", issue = "0")]
@ -154,16 +155,19 @@ pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize); pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
#[stable(feature = "test_feature", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! macro_test { macro_rules! macro_test {
() => (deprecated()); () => (deprecated());
} }
#[stable(feature = "test_feature", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! macro_test_arg { macro_rules! macro_test_arg {
($func:expr) => ($func); ($func:expr) => ($func);
} }
#[stable(feature = "test_feature", since = "1.0.0")]
#[macro_export] #[macro_export]
macro_rules! macro_test_arg_nested { macro_rules! macro_test_arg_nested {
($func:ident) => (macro_test_arg!($func())); ($func:ident) => (macro_test_arg!($func()));

View File

@ -12,6 +12,8 @@
#![staged_api] #![staged_api]
#![deny(deprecated)] #![deny(deprecated)]
#![unstable(feature = "test_feature", issue = "0")]
struct Foo; struct Foo;
impl Foo { impl Foo {

View File

@ -14,6 +14,8 @@
#![feature(staged_api)] #![feature(staged_api)]
#![staged_api] #![staged_api]
#![stable(feature = "rust1", since = "1.0.0")]
mod cross_crate { mod cross_crate {
extern crate lint_stability_fields; extern crate lint_stability_fields;

View File

@ -18,6 +18,8 @@
#![feature(staged_api)] #![feature(staged_api)]
#![staged_api] #![staged_api]
#![stable(feature = "rust1", since = "1.0.0")]
#[macro_use] #[macro_use]
extern crate lint_stability; extern crate lint_stability;
@ -127,7 +129,9 @@ mod cross_crate {
<Foo>::trait_stable_text(&foo); <Foo>::trait_stable_text(&foo);
<Foo as Trait>::trait_stable_text(&foo); <Foo as Trait>::trait_stable_text(&foo);
let _ = DeprecatedStruct { i: 0 }; //~ ERROR use of deprecated item let _ = DeprecatedStruct { //~ ERROR use of deprecated item
i: 0 //~ ERROR use of deprecated item
};
let _ = DeprecatedUnstableStruct { let _ = DeprecatedUnstableStruct {
//~^ ERROR use of deprecated item //~^ ERROR use of deprecated item
//~^^ ERROR use of unstable library feature //~^^ ERROR use of unstable library feature
@ -475,7 +479,7 @@ mod this_crate {
#[deprecated(since = "1.0.0", reason = "text")] #[deprecated(since = "1.0.0", reason = "text")]
fn test_fn_body() { fn test_fn_body() {
fn fn_in_body() {} fn fn_in_body() {}
fn_in_body(); fn_in_body(); //~ ERROR use of deprecated item: text
} }
impl MethodTester { impl MethodTester {
@ -483,7 +487,7 @@ mod this_crate {
#[deprecated(since = "1.0.0", reason = "text")] #[deprecated(since = "1.0.0", reason = "text")]
fn test_method_body(&self) { fn test_method_body(&self) {
fn fn_in_body() {} fn fn_in_body() {}
fn_in_body(); fn_in_body(); //~ ERROR use of deprecated item: text
} }
} }

View File

@ -14,6 +14,8 @@
#![feature(staged_api)] #![feature(staged_api)]
#![staged_api] #![staged_api]
#![stable(feature = "test_feature", since = "1.0.0")]
pub fn unmarked() { pub fn unmarked() {
//~^ ERROR This node does not have a stability attribute //~^ ERROR This node does not have a stability attribute
() ()

View File

@ -13,6 +13,8 @@
#![feature(staged_api)] #![feature(staged_api)]
#![staged_api] #![staged_api]
#![stable(feature = "test_feature", since = "1.0.0")]
#[stable(feature = "a", feature = "b", since = "1.0.0")] //~ ERROR multiple 'feature' items #[stable(feature = "a", feature = "b", since = "1.0.0")] //~ ERROR multiple 'feature' items
fn f1() { } fn f1() { }
@ -22,4 +24,9 @@ fn f2() { }
#[unstable(feature = "a", issue = "no")] //~ ERROR incorrect 'issue' #[unstable(feature = "a", issue = "no")] //~ ERROR incorrect 'issue'
fn f3() { } fn f3() { }
#[macro_export]
macro_rules! mac { //~ ERROR This node does not have a stability attribute
() => ()
}
fn main() { } fn main() { }

View File

@ -13,6 +13,8 @@
#![feature(staged_api)] #![feature(staged_api)]
#![staged_api] #![staged_api]
#![stable(feature = "rust1", since = "1.0.0")]
mod bogus_attribute_types_1 { mod bogus_attribute_types_1 {
#[stable(feature = "a", since = "a", reason)] //~ ERROR unknown meta item 'reason' #[stable(feature = "a", since = "a", reason)] //~ ERROR unknown meta item 'reason'
fn f1() { } fn f1() { }

View File

@ -14,6 +14,7 @@
/// ``` /// ```
/// #![staged_api] /// #![staged_api]
/// #![unstable(feature="test", issue="18199")]
/// fn main() {} /// fn main() {}
/// ``` /// ```
pub fn foo() {} pub fn foo() {}

View File

@ -12,6 +12,8 @@
#![staged_api] #![staged_api]
#![doc(issue_tracker_base_url = "http://issue_url/")] #![doc(issue_tracker_base_url = "http://issue_url/")]
#![unstable(feature="test", issue="27759")]
// @has issue_27759/unstable/index.html // @has issue_27759/unstable/index.html
// @has - '<code>test</code>' // @has - '<code>test</code>'
// @has - '<a href="http://issue_url/27759">#27759</a>' // @has - '<a href="http://issue_url/27759">#27759</a>'