Skip to content

Commit

Permalink
std: Add some missing stability attributes
Browse files Browse the repository at this point in the history
* Display::fmt is stable
* Debug::fmt is stable
* FromIterator::from_iter is stable
* Peekable::peek is stable
  • Loading branch information
alexcrichton committed Feb 3, 2015
1 parent 7858cb4 commit b2297fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ pub trait Show {
#[lang = "debug_trait"]
pub trait Debug {
/// Formats the value using the given formatter.
#[stable(feature = "rust1", since = "1.0.0")]
fn fmt(&self, &mut Formatter) -> Result;
}

Expand All @@ -290,6 +291,7 @@ pub trait String {
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Display {
/// Formats the value using the given formatter.
#[stable(feature = "rust1", since = "1.0.0")]
fn fmt(&self, &mut Formatter) -> Result;
}

Expand Down
2 changes: 2 additions & 0 deletions src/libcore/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ impl<'a, T> Iterator for &'a mut (Iterator<Item=T> + 'a) {
built from an iterator over elements of type `{A}`"]
pub trait FromIterator<A> {
/// Build a container with elements from an external iterator.
#[stable(feature = "rust1", since = "1.0.0")]
fn from_iter<T: Iterator<Item=A>>(iterator: T) -> Self;
}

Expand Down Expand Up @@ -1821,6 +1822,7 @@ impl<I: Iterator> Peekable<I> {
/// Return a reference to the next element of the iterator with out
/// advancing it, or None if the iterator is exhausted.
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn peek(&mut self) -> Option<&I::Item> {
if self.peeked.is_none() {
self.peeked = self.iter.next();
Expand Down

0 comments on commit b2297fd

Please sign in to comment.