Skip to content

Allow passing an impl Trait as argument #1487

Closed
@CohenArthur

Description

@CohenArthur
trait Printable {
    fn print(&self);
}

struct Foo;

impl Printable for Foo {
    fn print(&self) {}
}

fn take_printable(_: impl Printable) {}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions