Skip to content

Self fails to implement current trait in a default method #7323

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
huonw opened this issue Jun 23, 2013 · 1 comment
Closed

Self fails to implement current trait in a default method #7323

huonw opened this issue Jun 23, 2013 · 1 comment

Comments

@huonw
Copy link
Member

huonw commented Jun 23, 2013

trait Foo {
    fn foo(&self) {
        bar(self)
    }
}

fn bar<F: Foo>(_: &F) {}

fn main(){}
dm2.rs:3:8: 3:11 error: failed to find an implementation of trait Foo for Self
dm2.rs:3         bar(self)
                 ^~~

Presumably Self : Foo in a default method on Foo.

(Part of #2794.)

@huonw
Copy link
Member Author

huonw commented Jun 23, 2013

Whoops, dup of #7183.

@huonw huonw closed this as completed Jun 23, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant