Skip to content

Commit b9ab5fe

Browse files
committed
Stabilize a few remaining stragglers
* The `io::Seek` trait, and `SeekFrom` enum. * The `Iterator::{partition, unsip}` methods. * The `Vec::into_boxed_slice` method. * The `LinkedList::append` method. * The `{or_insert, or_insert_with` methods in the `Entry` APIs.
1 parent 80bf31d commit b9ab5fe

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

src/libcollections/btree/map.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,8 +1134,7 @@ impl<'a, K: Ord, V> Entry<'a, K, V> {
11341134
}
11351135
}
11361136

1137-
#[unstable(feature = "collections",
1138-
reason = "matches entry v3 specification, waiting for dust to settle")]
1137+
#[stable(feature = "rust1", since = "1.0.0")]
11391138
/// Ensures a value is in the entry by inserting the default if empty, and returns
11401139
/// a mutable reference to the value in the entry.
11411140
pub fn or_insert(self, default: V) -> &'a mut V {
@@ -1145,8 +1144,7 @@ impl<'a, K: Ord, V> Entry<'a, K, V> {
11451144
}
11461145
}
11471146

1148-
#[unstable(feature = "collections",
1149-
reason = "matches entry v3 specification, waiting for dust to settle")]
1147+
#[stable(feature = "rust1", since = "1.0.0")]
11501148
/// Ensures a value is in the entry by inserting the result of the default function if empty,
11511149
/// and returns a mutable reference to the value in the entry.
11521150
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V {

src/libcollections/linked_list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ impl<T> LinkedList<T> {
252252
/// }
253253
/// println!("{}", b.len()); // prints 0
254254
/// ```
255+
#[stable(feature = "rust1", since = "1.0.0")]
255256
pub fn append(&mut self, other: &mut LinkedList<T>) {
256257
match self.list_tail.resolve() {
257258
None => {

src/libcollections/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ impl<T> Vec<T> {
389389
/// Note that this will drop any excess capacity. Calling this and
390390
/// converting back to a vector with `into_vec()` is equivalent to calling
391391
/// `shrink_to_fit()`.
392-
#[unstable(feature = "collections")]
392+
#[stable(feature = "rust1", since = "1.0.0")]
393393
pub fn into_boxed_slice(mut self) -> Box<[T]> {
394394
self.shrink_to_fit();
395395
unsafe {

src/libcore/iter.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,7 @@ pub trait Iterator {
553553
/// assert_eq!(even, [2, 4]);
554554
/// assert_eq!(odd, [1, 3]);
555555
/// ```
556-
#[unstable(feature = "core",
557-
reason = "recently added as part of collections reform")]
556+
#[stable(feature = "rust1", since = "1.0.0")]
558557
fn partition<B, F>(self, mut f: F) -> (B, B) where
559558
Self: Sized,
560559
B: Default + Extend<Self::Item>,
@@ -930,7 +929,7 @@ pub trait Iterator {
930929
/// assert_eq!([1, 3], left);
931930
/// assert_eq!([2, 4], right);
932931
/// ```
933-
#[unstable(feature = "core", reason = "recent addition")]
932+
#[stable(feature = "rust1", since = "1.0.0")]
934933
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
935934
FromA: Default + Extend<A>,
936935
FromB: Default + Extend<B>,

src/libstd/collections/hash/map.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,8 +1482,7 @@ impl<'a, K, V> Entry<'a, K, V> {
14821482
}
14831483
}
14841484

1485-
#[unstable(feature = "collections",
1486-
reason = "matches entry v3 specification, waiting for dust to settle")]
1485+
#[stable(feature = "rust1", since = "1.0.0")]
14871486
/// Ensures a value is in the entry by inserting the default if empty, and returns
14881487
/// a mutable reference to the value in the entry.
14891488
pub fn or_insert(self, default: V) -> &'a mut V {
@@ -1493,8 +1492,7 @@ impl<'a, K, V> Entry<'a, K, V> {
14931492
}
14941493
}
14951494

1496-
#[unstable(feature = "collections",
1497-
reason = "matches entry v3 specification, waiting for dust to settle")]
1495+
#[stable(feature = "rust1", since = "1.0.0")]
14981496
/// Ensures a value is in the entry by inserting the result of the default function if empty,
14991497
/// and returns a mutable reference to the value in the entry.
15001498
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V {

src/libstd/io/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,7 @@ pub trait Write {
441441
///
442442
/// The stream typically has a fixed size, allowing seeking relative to either
443443
/// end or the current offset.
444-
#[unstable(feature = "io", reason = "the central `seek` method may be split \
445-
into multiple methods instead of taking \
446-
an enum as an argument")]
444+
#[stable(feature = "rust1", since = "1.0.0")]
447445
pub trait Seek {
448446
/// Seek to an offset, in bytes, in a stream
449447
///
@@ -459,28 +457,32 @@ pub trait Seek {
459457
/// # Errors
460458
///
461459
/// Seeking to a negative offset is considered an error
460+
#[stable(feature = "rust1", since = "1.0.0")]
462461
fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
463462
}
464463

465464
/// Enumeration of possible methods to seek within an I/O object.
466465
#[derive(Copy, PartialEq, Eq, Clone, Debug)]
467-
#[unstable(feature = "io", reason = "awaiting the stability of Seek")]
466+
#[stable(feature = "rust1", since = "1.0.0")]
468467
pub enum SeekFrom {
469468
/// Set the offset to the provided number of bytes.
469+
#[stable(feature = "rust1", since = "1.0.0")]
470470
Start(u64),
471471

472472
/// Set the offset to the size of this object plus the specified number of
473473
/// bytes.
474474
///
475475
/// It is possible to seek beyond the end of an object, but is an error to
476476
/// seek before byte 0.
477+
#[stable(feature = "rust1", since = "1.0.0")]
477478
End(i64),
478479

479480
/// Set the offset to the current position plus the specified number of
480481
/// bytes.
481482
///
482483
/// It is possible to seek beyond the end of an object, but is an error to
483484
/// seek before byte 0.
485+
#[stable(feature = "rust1", since = "1.0.0")]
484486
Current(i64),
485487
}
486488

0 commit comments

Comments
 (0)