Skip to content

Any and Any::get_type_id should not be stable #19222

Closed
@reem

Description

@reem

The Any trait is not in release condition at all, considering that is still uses slow virtual calls that could be replaced with an associated static in the near future but stabilizing with get_type_id would mean that it could not be removed.

Normally, this isn't an issue, but since Any is almost exclusively used through trait objects this blocks possible optimizations to layout that could allow Box<Any> to be represented as *mut (), TypeId instead of containing a full vtable.

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