Skip to content

Commit 1c3b19d

Browse files
committed
Auto merge of #28021 - steveklabnik:gh27958, r=alexcrichton
Fixes #27958
2 parents a48c29d + dec4351 commit 1c3b19d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/libcore/any.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
//!
1414
//! `Any` itself can be used to get a `TypeId`, and has more features when used
1515
//! as a trait object. As `&Any` (a borrowed trait object), it has the `is` and
16-
//! `as_ref` methods, to test if the contained value is of a given type, and to
17-
//! get a reference to the inner value as a type. As `&mut Any`, there is also
18-
//! the `as_mut` method, for getting a mutable reference to the inner value.
19-
//! `Box<Any>` adds the `move` method, which will unwrap a `Box<T>` from the
20-
//! object. See the extension traits (`*Ext`) for the full details.
16+
//! `downcast_ref` methods, to test if the contained value is of a given type,
17+
//! and to get a reference to the inner value as a type. As `&mut Any`, there
18+
//! is also the `downcast_mut` method, for getting a mutable reference to the
19+
//! inner value. `Box<Any>` adds the `move` method, which will unwrap a
20+
//! `Box<T>` from the object. See the extension traits (`*Ext`) for the full
21+
//! details.
2122
//!
2223
//! Note that &Any is limited to testing whether a value is of a specified
2324
//! concrete type, and cannot be used to test whether a type implements a trait.

0 commit comments

Comments
 (0)