Skip to content

Commit cfc7791

Browse files
committed
std: Add some missing stability attributes
* Display::fmt is stable * Debug::fmt is stable * FromIterator::from_iter is stable * Peekable::peek is stable
1 parent ca4b967 commit cfc7791

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/libcore/fmt/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ pub trait Show {
298298
#[lang = "debug_trait"]
299299
pub trait Debug {
300300
/// Formats the value using the given formatter.
301+
#[stable(feature = "rust1", since = "1.0.0")]
301302
fn fmt(&self, &mut Formatter) -> Result;
302303
}
303304

@@ -324,6 +325,7 @@ pub trait String {
324325
#[stable(feature = "rust1", since = "1.0.0")]
325326
pub trait Display {
326327
/// Formats the value using the given formatter.
328+
#[stable(feature = "rust1", since = "1.0.0")]
327329
fn fmt(&self, &mut Formatter) -> Result;
328330
}
329331

src/libcore/iter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ impl<'a, T> Iterator for &'a mut (Iterator<Item=T> + 'a) {
119119
built from an iterator over elements of type `{A}`"]
120120
pub trait FromIterator<A> {
121121
/// Build a container with elements from an external iterator.
122+
#[stable(feature = "rust1", since = "1.0.0")]
122123
fn from_iter<T: Iterator<Item=A>>(iterator: T) -> Self;
123124
}
124125

@@ -1866,6 +1867,7 @@ impl<T, I> Peekable<T, I> where I: Iterator<Item=T> {
18661867
/// Return a reference to the next element of the iterator with out advancing it,
18671868
/// or None if the iterator is exhausted.
18681869
#[inline]
1870+
#[stable(feature = "rust1", since = "1.0.0")]
18691871
pub fn peek(&mut self) -> Option<&T> {
18701872
if self.peeked.is_none() {
18711873
self.peeked = self.iter.next();

0 commit comments

Comments
 (0)