Skip to content

Have multiple references to a struct by trait #10945

Closed
@HeroesGrave

Description

@HeroesGrave

There was one feature of the @-pointer that has not been fixed since it was removed.

If you wanted to pass a struct around by referring to it as a trait, you could do @SomeTrait.

~-ptrs aren't always suitable for this because you may need more than one reference to the struct underneath the trait.

&-ptrs aren't suitable for this... well, because they aren't. :P

Obviously Rc, which is supposed to be the replacement for '@' doesn't work because you'd need another pointer inside it anyway.

Is there some way that this functionality can be restored?

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