Skip to content

Commit b2297fd

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 7858cb4 commit b2297fd

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
@@ -264,6 +264,7 @@ pub trait Show {
264264
#[lang = "debug_trait"]
265265
pub trait Debug {
266266
/// Formats the value using the given formatter.
267+
#[stable(feature = "rust1", since = "1.0.0")]
267268
fn fmt(&self, &mut Formatter) -> Result;
268269
}
269270

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

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

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

0 commit comments

Comments
 (0)