Skip to content

Any trait documentation mentions non-existing methods #27958

@roosmaa

Description

@roosmaa

In the paragraph about the any module:

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.

Shouldn't the as_ref/as_mut methods mentioned be infact downcast_ref/downcast_mut methods? Can't find any as_ref/as_mut method implementations for the Any trait anywhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions