Skip to content

Trait object coercion without as #10039

Closed
@alexcrichton

Description

@alexcrichton

When creating a trait object, I shouldn't have to write &mut obj as &mut Trait, I should be able to just write &mut obj and the compiler will coerce it to &mut Trait.

I remember awhile ago that @pcwalton had a patch to do this, but then it fell by the wayside. I was under the impression that we want to get this done, so I'm nominating this for 1.0.

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