2018-11-06 23:17:11 +00:00
|
|
|
trait Foo: Iterator<Item = i32, Item = i32> {}
|
2018-11-27 09:56:36 +00:00
|
|
|
//~^ ERROR is already specified
|
2023-04-19 00:13:53 +00:00
|
|
|
//~| ERROR is already specified
|
2018-11-06 23:17:11 +00:00
|
|
|
|
|
|
|
type Unit = ();
|
|
|
|
|
2019-05-28 18:46:13 +00:00
|
|
|
fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
|
2018-11-27 09:56:36 +00: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() {
|
2019-05-28 18:46:13 +00:00
|
|
|
let _: &dyn Iterator<Item = i32, Item = i32>;
|
2018-11-06 23:17:11 +00:00
|
|
|
test();
|
2018-10-12 00:50:03 +00:00
|
|
|
}
|