Skip to content

TypeId only allows sized types that have a 'static bound #20168

@Marwes

Description

@Marwes

Ran into the 'static bound when trying to use std::any::Any with types containing borrowed references. The original issue about TypeId indicates that it would be possible but might be problematic to implement #9913.

It would seem that now with DST it might also be possible to get the TypeId of unsized types as well (might also be relevant for TyDesc which allows non 'static bound but not DST).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions