Closed
Description
struct Foo<T>(T);
impl<T> Foo<T> {
static pure fn foo<U>(theta: U) -> Foo<T> {
Bar::bar(theta)
}
}
impl<T> Foo<T>: Bar<T> {
static pure fn bar<U>(_theta: U) -> Foo<T> { fail(~"") }
}
trait Bar<T> {
static pure fn bar<U>(theta: U) -> self;
}
fn main() {}
$ rustc cross_mod_traits.rs
test.rs:5:8: 5:16 error: failed to find an implementation of trait @Bar<<V1>> for <V2>
test.rs:5 Bar::bar(theta)
When I remove the type parameters on any of the items it compiles.