From 4ec5cdc94b83e1a37c628033597c17c4d7645128 Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Fri, 3 Dec 2021 16:06:13 -0500 Subject: [PATCH] fix stability annotations for `Box::downcast` --- library/alloc/src/boxed.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index e6f687ddf96..4898b9ca8fc 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1500,7 +1500,7 @@ impl Box { /// 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(self) -> Result, Self> { if self.is::() { unsafe { Ok(self.downcast_unchecked::()) } } else { Err(self) } } @@ -1559,7 +1559,7 @@ impl Box { /// 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(self) -> Result, Self> { if self.is::() { unsafe { Ok(self.downcast_unchecked::()) } } else { Err(self) } }