Skip to content

Stabilize a few remaining stragglers #23908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,7 @@ impl<'a, K: Ord, V> Entry<'a, K, V> {
}
}

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

#[unstable(feature = "collections",
reason = "matches entry v3 specification, waiting for dust to settle")]
#[stable(feature = "rust1", since = "1.0.0")]
/// Ensures a value is in the entry by inserting the result of the default function if empty,
/// and returns a mutable reference to the value in the entry.
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V {
Expand Down
1 change: 1 addition & 0 deletions src/libcollections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ impl<T> LinkedList<T> {
/// }
/// println!("{}", b.len()); // prints 0
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn append(&mut self, other: &mut LinkedList<T>) {
match self.list_tail.resolve() {
None => {
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ impl<T> Vec<T> {
/// Note that this will drop any excess capacity. Calling this and
/// converting back to a vector with `into_vec()` is equivalent to calling
/// `shrink_to_fit()`.
#[unstable(feature = "collections")]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn into_boxed_slice(mut self) -> Box<[T]> {
self.shrink_to_fit();
unsafe {
Expand Down
5 changes: 2 additions & 3 deletions src/libcore/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,7 @@ pub trait Iterator {
/// assert_eq!(even, [2, 4]);
/// assert_eq!(odd, [1, 3]);
/// ```
#[unstable(feature = "core",
reason = "recently added as part of collections reform")]
#[stable(feature = "rust1", since = "1.0.0")]
fn partition<B, F>(self, mut f: F) -> (B, B) where
Self: Sized,
B: Default + Extend<Self::Item>,
Expand Down Expand Up @@ -930,7 +929,7 @@ pub trait Iterator {
/// assert_eq!([1, 3], left);
/// assert_eq!([2, 4], right);
/// ```
#[unstable(feature = "core", reason = "recent addition")]
#[stable(feature = "rust1", since = "1.0.0")]
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Expand Down
6 changes: 2 additions & 4 deletions src/libstd/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1482,8 +1482,7 @@ impl<'a, K, V> Entry<'a, K, V> {
}
}

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

#[unstable(feature = "collections",
reason = "matches entry v3 specification, waiting for dust to settle")]
#[stable(feature = "rust1", since = "1.0.0")]
/// Ensures a value is in the entry by inserting the result of the default function if empty,
/// and returns a mutable reference to the value in the entry.
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V {
Expand Down
10 changes: 6 additions & 4 deletions src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,7 @@ pub trait Write {
///
/// The stream typically has a fixed size, allowing seeking relative to either
/// end or the current offset.
#[unstable(feature = "io", reason = "the central `seek` method may be split \
into multiple methods instead of taking \
an enum as an argument")]
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Seek {
/// Seek to an offset, in bytes, in a stream
///
Expand All @@ -459,28 +457,32 @@ pub trait Seek {
/// # Errors
///
/// Seeking to a negative offset is considered an error
#[stable(feature = "rust1", since = "1.0.0")]
fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this also stabilize SeekFrom and its variants?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh! Done.

}

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

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

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

Expand Down