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