Rollup merge of #52103 - tmccombs:rc_downcast, r=Mark-Simulacrum
Stabilize rc_downcast Fixes #44608
This commit is contained in:
@@ -620,13 +620,12 @@ impl<T: Clone> Rc<T> {
|
|||||||
|
|
||||||
impl Rc<Any> {
|
impl Rc<Any> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "rc_downcast", issue = "44608")]
|
#[stable(feature = "rc_downcast", since = "1.29.0")]
|
||||||
/// Attempt to downcast the `Rc<Any>` to a concrete type.
|
/// Attempt to downcast the `Rc<Any>` to a concrete type.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(rc_downcast)]
|
|
||||||
/// use std::any::Any;
|
/// use std::any::Any;
|
||||||
/// use std::rc::Rc;
|
/// use std::rc::Rc;
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -980,13 +980,12 @@ unsafe impl<#[may_dangle] T: ?Sized> Drop for Arc<T> {
|
|||||||
|
|
||||||
impl Arc<Any + Send + Sync> {
|
impl Arc<Any + Send + Sync> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[unstable(feature = "rc_downcast", issue = "44608")]
|
#[stable(feature = "rc_downcast", since = "1.29.0")]
|
||||||
/// Attempt to downcast the `Arc<Any + Send + Sync>` to a concrete type.
|
/// Attempt to downcast the `Arc<Any + Send + Sync>` to a concrete type.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// #![feature(rc_downcast)]
|
|
||||||
/// use std::any::Any;
|
/// use std::any::Any;
|
||||||
/// use std::sync::Arc;
|
/// use std::sync::Arc;
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user