]> git.lizzy.rs Git - rust.git/commitdiff
fix stability annotations for `Box::downcast`
authorIbraheem Ahmed <ibrah1440@gmail.com>
Fri, 3 Dec 2021 21:06:13 +0000 (16:06 -0500)
committerIbraheem Ahmed <ibrah1440@gmail.com>
Fri, 3 Dec 2021 21:06:13 +0000 (16:06 -0500)
library/alloc/src/boxed.rs

index e6f687ddf96336f586228ad144299d06128336d0..4898b9ca8fc3545add1c05dbd69f50a7284e89f6 100644 (file)
@@ -1500,7 +1500,7 @@ impl<A: Allocator> Box<dyn Any, A> {
     /// print_if_string(Box::new(0i8));
     /// ```
     #[inline]
-    #[stable(feature = "box_send_sync_any_downcast", since = "1.51.0")]
+    #[stable(feature = "rust1", since = "1.0.0")]
     pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
         if self.is::<T>() { unsafe { Ok(self.downcast_unchecked::<T>()) } } else { Err(self) }
     }
@@ -1559,7 +1559,7 @@ impl<A: Allocator> Box<dyn Any + Send, A> {
     /// print_if_string(Box::new(0i8));
     /// ```
     #[inline]
-    #[stable(feature = "box_send_sync_any_downcast", since = "1.51.0")]
+    #[stable(feature = "rust1", since = "1.0.0")]
     pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
         if self.is::<T>() { unsafe { Ok(self.downcast_unchecked::<T>()) } } else { Err(self) }
     }