]> git.lizzy.rs Git - rust.git/commitdiff
Any docs: as_ref doesn't exist anymore
authorSteve Klabnik <steve@steveklabnik.com>
Wed, 26 Aug 2015 17:59:39 +0000 (13:59 -0400)
committerSteve Klabnik <steve@steveklabnik.com>
Wed, 26 Aug 2015 17:59:39 +0000 (13:59 -0400)
Fixes #27958

src/libcore/any.rs

index 899e32d29a65b8ab3855d2fbdd2017609f6a0af4..16760f7170708e2d9abba7b8eb28c3a946f45c6e 100644 (file)
 //!
 //! `Any` itself can be used to get a `TypeId`, and has more features when used
 //! as a trait object. As `&Any` (a borrowed trait object), it has the `is` and
-//! `as_ref` methods, to test if the contained value is of a given type, and to
-//! get a reference to the inner value as a type. As `&mut Any`, there is also
-//! the `as_mut` method, for getting a mutable reference to the inner value.
-//! `Box<Any>` adds the `move` method, which will unwrap a `Box<T>` from the
-//! object.  See the extension traits (`*Ext`) for the full details.
+//! `downcast_ref` methods, to test if the contained value is of a given type,
+//! and to get a reference to the inner value as a type. As `&mut Any`, there
+//! is also the `downcast_mut` method, for getting a mutable reference to the
+//! inner value. `Box<Any>` adds the `move` method, which will unwrap a
+//! `Box<T>` from the object. See the extension traits (`*Ext`) for the full
+//! details.
 //!
 //! Note that &Any is limited to testing whether a value is of a specified
 //! concrete type, and cannot be used to test whether a type implements a trait.