Skip to content

Commit 4ec5cdc

Browse files
committed
fix stability annotations for Box::downcast
1 parent 25271a5 commit 4ec5cdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/alloc/src/boxed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ impl<A: Allocator> Box<dyn Any, A> {
15001500
/// print_if_string(Box::new(0i8));
15011501
/// ```
15021502
#[inline]
1503-
#[stable(feature = "box_send_sync_any_downcast", since = "1.51.0")]
1503+
#[stable(feature = "rust1", since = "1.0.0")]
15041504
pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
15051505
if self.is::<T>() { unsafe { Ok(self.downcast_unchecked::<T>()) } } else { Err(self) }
15061506
}
@@ -1559,7 +1559,7 @@ impl<A: Allocator> Box<dyn Any + Send, A> {
15591559
/// print_if_string(Box::new(0i8));
15601560
/// ```
15611561
#[inline]
1562-
#[stable(feature = "box_send_sync_any_downcast", since = "1.51.0")]
1562+
#[stable(feature = "rust1", since = "1.0.0")]
15631563
pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
15641564
if self.is::<T>() { unsafe { Ok(self.downcast_unchecked::<T>()) } } else { Err(self) }
15651565
}

0 commit comments

Comments
 (0)