Skip to content

Commit 25271a5

Browse files
committed
fix doc links for downcast_unchecked
1 parent 6f98293 commit 25271a5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

library/alloc/src/boxed.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,8 @@ impl<A: Allocator> Box<dyn Any, A> {
15271527
///
15281528
/// The contained value must be of type `T`. Calling this method
15291529
/// with the incorrect type is *undefined behavior*.
1530+
///
1531+
/// [`downcast`]: Self::downcast
15301532
#[inline]
15311533
#[unstable(feature = "downcast_unchecked", issue = "90850")]
15321534
pub unsafe fn downcast_unchecked<T: Any>(self) -> Box<T, A> {
@@ -1584,6 +1586,8 @@ impl<A: Allocator> Box<dyn Any + Send, A> {
15841586
///
15851587
/// The contained value must be of type `T`. Calling this method
15861588
/// with the incorrect type is *undefined behavior*.
1589+
///
1590+
/// [`downcast`]: Self::downcast
15871591
#[inline]
15881592
#[unstable(feature = "downcast_unchecked", issue = "90850")]
15891593
pub unsafe fn downcast_unchecked<T: Any>(self) -> Box<T, A> {
@@ -1641,6 +1645,8 @@ impl<A: Allocator> Box<dyn Any + Send + Sync, A> {
16411645
///
16421646
/// The contained value must be of type `T`. Calling this method
16431647
/// with the incorrect type is *undefined behavior*.
1648+
///
1649+
/// [`downcast`]: Self::downcast
16441650
#[inline]
16451651
#[unstable(feature = "downcast_unchecked", issue = "90850")]
16461652
pub unsafe fn downcast_unchecked<T: Any>(self) -> Box<T, A> {

library/core/src/any.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ impl dyn Any {
265265

266266
/// Returns a reference to the inner value as type `dyn T`.
267267
///
268-
/// For a safe alternative see [`downcast_ref`].
269-
///
270268
/// # Examples
271269
///
272270
/// ```
@@ -295,8 +293,6 @@ impl dyn Any {
295293

296294
/// Returns a mutable reference to the inner value as type `dyn T`.
297295
///
298-
/// For a safe alternative see [`downcast_mut`].
299-
///
300296
/// # Examples
301297
///
302298
/// ```

0 commit comments

Comments
 (0)