]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/assoc-type-in-superbad.rs
Add regression test for #82830
[rust.git] / src / test / ui / traits / assoc-type-in-superbad.rs
1 // Test case where an associated type is referenced from within the
2 // supertrait definition, and the impl makes the wrong
3 // associations. Issue #20220.
4
5 use std::vec::IntoIter;
6
7 pub trait Foo: Iterator<Item=<Self as Foo>::Key> {
8     type Key;
9 }
10
11 impl Foo for IntoIter<i32> {
12     type Key = u32; //~ ERROR type mismatch
13 }
14
15 fn main() {
16 }