15 lines
288 B
Rust
Raw Normal View History

trait Foo: Iterator<Item = i32, Item = i32> {}
2018-11-27 10:56:36 +01:00
//~^ ERROR is already specified
type Unit = ();
fn test() -> Box<Iterator<Item = (), Item = Unit>> {
2018-11-27 10:56:36 +01:00
//~^ ERROR is already specified
Box::new(None.into_iter())
}
fn main() {
let _: &Iterator<Item = i32, Item = i32>;
test();
}