Skip to content

Commit 4caffa8

Browse files
committed
libs: fix #[stable] inheritance fallout
A recent change turned off inheritance for the #[stable] by default, but failed to catch all the cases where this was being used in std. This patch fixes that problem.
1 parent 1bf0649 commit 4caffa8

File tree

7 files changed

+62
-15
lines changed

7 files changed

+62
-15
lines changed

src/liballoc/rc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ pub struct Rc<T> {
179179
_noshare: marker::NoSync
180180
}
181181

182-
#[stable]
183182
impl<T> Rc<T> {
184183
/// Constructs a new reference-counted pointer.
184+
#[stable]
185185
pub fn new(value: T) -> Rc<T> {
186186
unsafe {
187187
Rc {
@@ -200,9 +200,7 @@ impl<T> Rc<T> {
200200
}
201201
}
202202
}
203-
}
204203

205-
impl<T> Rc<T> {
206204
/// Downgrades the reference-counted pointer to a weak reference.
207205
#[experimental = "Weak pointers may not belong in this module"]
208206
pub fn downgrade(&self) -> Weak<T> {

src/libcollections/vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ impl<T> Vec<T> {
645645
/// assert!(vec.capacity() >= 3);
646646
/// ```
647647
#[stable]
648-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
649648
pub fn shrink_to_fit(&mut self) {
650649
if mem::size_of::<T>() == 0 { return }
651650

src/libcore/any.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ use intrinsics::TypeId;
8888
#[stable]
8989
pub trait Any: 'static {
9090
/// Get the `TypeId` of `self`
91+
#[stable]
9192
fn get_type_id(&self) -> TypeId;
9293
}
9394

@@ -117,7 +118,6 @@ pub trait AnyRefExt<'a> {
117118
#[stable]
118119
impl<'a> AnyRefExt<'a> for &'a Any {
119120
#[inline]
120-
#[stable]
121121
fn is<T: 'static>(self) -> bool {
122122
// Get TypeId of the type this function is instantiated with
123123
let t = TypeId::of::<T>();
@@ -130,7 +130,6 @@ impl<'a> AnyRefExt<'a> for &'a Any {
130130
}
131131

132132
#[inline]
133-
#[unstable = "naming conventions around acquiring references may change"]
134133
fn downcast_ref<T: 'static>(self) -> Option<&'a T> {
135134
if self.is::<T>() {
136135
unsafe {
@@ -159,7 +158,6 @@ pub trait AnyMutRefExt<'a> {
159158
#[stable]
160159
impl<'a> AnyMutRefExt<'a> for &'a mut Any {
161160
#[inline]
162-
#[unstable = "naming conventions around acquiring references may change"]
163161
fn downcast_mut<T: 'static>(self) -> Option<&'a mut T> {
164162
if self.is::<T>() {
165163
unsafe {

0 commit comments

Comments
 (0)