Skip to content

Support arbitrary self types #19

@tmandry

Description

@tmandry

Support self types like &Box<Self> and Arc<Self>, and Pin<Box<Self>>.

These shouldn't actually be "arbitrary" because we need to know that we can coerce their inner types to dyn.. the same requirements that would need to be verified for rust-lang/rfcs#3621 (#[derive(CoercePointee)] as it's now being called). For self types involving Pin, we would also need to know the PinCoerceUnsized trait detailed in that RFC is implemented. All of this is unstable for now, so we can support it in a later PR.

For now, we can just allowlist specific pointer types from the standard library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions