Closed
Description
The following example fails to compile:
trait Foo {
type B;
fn get() -> Self::B;
}
fn foo<T>() -> ()
where T : Foo<B=()>, T : Foo<B=()>
{
<T as Foo>::get()
}
fn main() { }
It yields:
<anon>:10:5: 10:21 error: type annotations required: cannot resolve `<T as Foo>::B == _` [E0284]
<anon>:10 <T as Foo>::get()
^~~~~~~~~~~~~~~~
error: aborting due to previous error
playpen: application terminated with error code 101
However, if you comment out the duplicate where clause, it will compile just fine.