Skip to content

Commit 7101ff4

Browse files
committed
2 parents fcf2ba7 + 6a5b1e9 commit 7101ff4

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

src/libcollections/btree/map.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,26 @@ pub struct RangeMut<'a, K: 'a, V: 'a> {
125125
}
126126

127127
/// A view into a single entry in a map, which may either be vacant or occupied.
128-
#[unstable(feature = "collections",
129-
reason = "precise API still under development")]
128+
#[stable(feature = "rust1", since = "1.0.0")]
130129
pub enum Entry<'a, K:'a, V:'a> {
131130
/// A vacant Entry
131+
#[stable(feature = "rust1", since = "1.0.0")]
132132
Vacant(VacantEntry<'a, K, V>),
133+
133134
/// An occupied Entry
135+
#[stable(feature = "rust1", since = "1.0.0")]
134136
Occupied(OccupiedEntry<'a, K, V>),
135137
}
136138

137139
/// A vacant Entry.
138-
#[unstable(feature = "collections",
139-
reason = "precise API still under development")]
140+
#[stable(feature = "rust1", since = "1.0.0")]
140141
pub struct VacantEntry<'a, K:'a, V:'a> {
141142
key: K,
142143
stack: stack::SearchStack<'a, K, V, node::handle::Edge, node::handle::Leaf>,
143144
}
144145

145146
/// An occupied Entry.
146-
#[unstable(feature = "collections",
147-
reason = "precise API still under development")]
147+
#[stable(feature = "rust1", since = "1.0.0")]
148148
pub struct OccupiedEntry<'a, K:'a, V:'a> {
149149
stack: stack::SearchStack<'a, K, V, node::handle::KV, node::handle::LeafOrInternal>,
150150
}
@@ -1143,9 +1143,9 @@ impl<'a, K, V> DoubleEndedIterator for RangeMut<'a, K, V> {
11431143
}
11441144

11451145
impl<'a, K: Ord, V> Entry<'a, K, V> {
1146-
#[unstable(feature = "collections",
1147-
reason = "matches collection reform v2 specification, waiting for dust to settle")]
11481146
/// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant
1147+
#[unstable(feature = "std_misc",
1148+
reason = "will soon be replaced by or_insert")]
11491149
pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, K, V>> {
11501150
match self {
11511151
Occupied(entry) => Ok(entry.into_mut()),

src/libcollections/vec_map.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,28 @@ pub struct VecMap<V> {
6767
}
6868

6969
/// A view into a single entry in a map, which may either be vacant or occupied.
70-
#[unstable(feature = "collections",
71-
reason = "precise API still under development")]
70+
71+
#[stable(feature = "rust1", since = "1.0.0")]
7272
pub enum Entry<'a, V:'a> {
7373
/// A vacant Entry
74+
#[stable(feature = "rust1", since = "1.0.0")]
7475
Vacant(VacantEntry<'a, V>),
76+
7577
/// An occupied Entry
78+
#[stable(feature = "rust1", since = "1.0.0")]
7679
Occupied(OccupiedEntry<'a, V>),
7780
}
7881

7982
/// A vacant Entry.
80-
#[unstable(feature = "collections",
81-
reason = "precise API still under development")]
83+
84+
#[stable(feature = "rust1", since = "1.0.0")]
8285
pub struct VacantEntry<'a, V:'a> {
8386
map: &'a mut VecMap<V>,
8487
index: usize,
8588
}
8689

8790
/// An occupied Entry.
88-
#[unstable(feature = "collections",
89-
reason = "precise API still under development")]
91+
#[stable(feature = "rust1", since = "1.0.0")]
9092
pub struct OccupiedEntry<'a, V:'a> {
9193
map: &'a mut VecMap<V>,
9294
index: usize,
@@ -651,7 +653,7 @@ impl<V> VecMap<V> {
651653

652654
impl<'a, V> Entry<'a, V> {
653655
#[unstable(feature = "collections",
654-
reason = "matches collection reform v2 specification, waiting for dust to settle")]
656+
reason = "will soon be replaced by or_insert")]
655657
/// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant
656658
pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, V>> {
657659
match self {

src/libstd/collections/hash/map.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,28 +1339,28 @@ pub struct Drain<'a, K: 'a, V: 'a> {
13391339
}
13401340

13411341
/// A view into a single occupied location in a HashMap.
1342-
#[unstable(feature = "std_misc",
1343-
reason = "precise API still being fleshed out")]
1342+
#[stable(feature = "rust1", since = "1.0.0")]
13441343
pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
13451344
elem: FullBucket<K, V, &'a mut RawTable<K, V>>,
13461345
}
13471346

13481347
/// A view into a single empty location in a HashMap.
1349-
#[unstable(feature = "std_misc",
1350-
reason = "precise API still being fleshed out")]
1348+
#[stable(feature = "rust1", since = "1.0.0")]
13511349
pub struct VacantEntry<'a, K: 'a, V: 'a> {
13521350
hash: SafeHash,
13531351
key: K,
13541352
elem: VacantEntryState<K, V, &'a mut RawTable<K, V>>,
13551353
}
13561354

13571355
/// A view into a single location in a map, which may be vacant or occupied.
1358-
#[unstable(feature = "std_misc",
1359-
reason = "precise API still being fleshed out")]
1356+
#[stable(feature = "rust1", since = "1.0.0")]
13601357
pub enum Entry<'a, K: 'a, V: 'a> {
13611358
/// An occupied Entry.
1359+
#[stable(feature = "rust1", since = "1.0.0")]
13621360
Occupied(OccupiedEntry<'a, K, V>),
1361+
13631362
/// A vacant Entry.
1363+
#[stable(feature = "rust1", since = "1.0.0")]
13641364
Vacant(VacantEntry<'a, K, V>),
13651365
}
13661366

@@ -1481,10 +1481,10 @@ impl<'a, K, V> ExactSizeIterator for Drain<'a, K, V> {
14811481
#[inline] fn len(&self) -> usize { self.inner.len() }
14821482
}
14831483

1484-
#[unstable(feature = "std_misc",
1485-
reason = "matches collection reform v2 specification, waiting for dust to settle")]
14861484
impl<'a, K, V> Entry<'a, K, V> {
14871485
/// Returns a mutable reference to the entry if occupied, or the VacantEntry if vacant.
1486+
#[unstable(feature = "std_misc",
1487+
reason = "will soon be replaced by or_insert")]
14881488
pub fn get(self) -> Result<&'a mut V, VacantEntry<'a, K, V>> {
14891489
match self {
14901490
Occupied(entry) => Ok(entry.into_mut()),

0 commit comments

Comments
 (0)