Skip to content

Commit

Permalink
fix doc links for downcast_unchecked
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheemdev committed Nov 20, 2021
1 parent 6f98293 commit 25271a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions library/alloc/src/boxed.rs
Expand Up @@ -1527,6 +1527,8 @@ impl<A: Allocator> Box<dyn Any, A> {
///
/// The contained value must be of type `T`. Calling this method
/// with the incorrect type is *undefined behavior*.
///
/// [`downcast`]: Self::downcast
#[inline]
#[unstable(feature = "downcast_unchecked", issue = "90850")]
pub unsafe fn downcast_unchecked<T: Any>(self) -> Box<T, A> {
Expand Down Expand Up @@ -1584,6 +1586,8 @@ impl<A: Allocator> Box<dyn Any + Send, A> {
///
/// The contained value must be of type `T`. Calling this method
/// with the incorrect type is *undefined behavior*.
///
/// [`downcast`]: Self::downcast
#[inline]
#[unstable(feature = "downcast_unchecked", issue = "90850")]
pub unsafe fn downcast_unchecked<T: Any>(self) -> Box<T, A> {
Expand Down Expand Up @@ -1641,6 +1645,8 @@ impl<A: Allocator> Box<dyn Any + Send + Sync, A> {
///
/// The contained value must be of type `T`. Calling this method
/// with the incorrect type is *undefined behavior*.
///
/// [`downcast`]: Self::downcast
#[inline]
#[unstable(feature = "downcast_unchecked", issue = "90850")]
pub unsafe fn downcast_unchecked<T: Any>(self) -> Box<T, A> {
Expand Down
4 changes: 0 additions & 4 deletions library/core/src/any.rs
Expand Up @@ -265,8 +265,6 @@ impl dyn Any {

/// Returns a reference to the inner value as type `dyn T`.
///
/// For a safe alternative see [`downcast_ref`].
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -295,8 +293,6 @@ impl dyn Any {

/// Returns a mutable reference to the inner value as type `dyn T`.
///
/// For a safe alternative see [`downcast_mut`].
///
/// # Examples
///
/// ```
Expand Down

0 comments on commit 25271a5

Please sign in to comment.