Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Associated types in traits used as bounds are treated as type arguments #18173

Closed
rpjohnst opened this issue Oct 20, 2014 · 2 comments · Fixed by #25476
Closed

Associated types in traits used as bounds are treated as type arguments #18173

rpjohnst opened this issue Oct 20, 2014 · 2 comments · Fixed by #25476
Labels
A-typesystem Area: The type system E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@rpjohnst
Copy link
Contributor

When using a trait with an associated type as a bound on a type argument, its associated types are treated as arguments rather than as determined by the impl:

trait Foo {
    type T;
}

trait Bar<F: Foo> {
    fn bar(foo: &F);
}
error: wrong number of type arguments: expected 1, found 0

http://is.gd/KPP4ka

@ftxqxd
Copy link
Contributor

ftxqxd commented Oct 20, 2014

Seems related to or maybe a dup of #17696.

@steveklabnik steveklabnik added the A-typesystem Area: The type system label Jan 27, 2015
@ftxqxd
Copy link
Contributor

ftxqxd commented May 15, 2015

Looks like this compiles now. Can this be closed?

@alexcrichton alexcrichton added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label May 16, 2015
Manishearth added a commit to Manishearth/rust that referenced this issue May 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants