Open
Description
Affected Versions
At least 1.3, 1.4, rustc 1.5.0-nightly (11a612795 2015-10-04)
STR
trait Foo { type Bar; }
impl<T> Foo for T { type Bar = u64; }
fn foo<T>() -> <T as Foo>::Bar
where T: Foo // <- the code compiles if this is removed
{ 1 }
fn main() {}
Expected Result
the code should compile
Actual Result
<anon>:7:14: 7:15 error: mismatched types:
expected `<T as Foo>::Bar`,
found `_`
(expected associated type,
found integral variable) [E0308]
<anon>:7 x = Some(1);
^