blob: d7d6241ef708cda1a68a922940d7a3963417a6ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Test case where an associated type is referenced from within the
// supertrait definition, and the impl makes the wrong
// associations. Issue #20220.
use std::vec::IntoIter;
pub trait Foo: Iterator<Item = <Self as Foo>::Key> {
type Key;
}
impl Foo for IntoIter<i32> {
type Key = u32;
//~^ ERROR expected `std::vec::IntoIter<i32>` to be an iterator that yields `u32`, but it yields `i32`
}
fn main() {}
|