2018-11-06 17:17:11 -06:00
|
|
|
trait Foo: Iterator<Item = i32, Item = i32> {}
|
2018-11-27 03:56:36 -06:00
|
|
|
//~^ ERROR is already specified
|
2023-04-18 19:13:53 -05:00
|
|
|
//~| ERROR is already specified
|
2023-10-31 08:45:26 -05:00
|
|
|
//~| ERROR is already specified
|
2018-11-06 17:17:11 -06:00
|
|
|
|
|
|
|
type Unit = ();
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
|
2018-11-27 03:56:36 -06:00
|
|
|
//~^ ERROR is already specified
|
2018-11-06 17:17:11 -06:00
|
|
|
Box::new(None.into_iter())
|
|
|
|
}
|
|
|
|
|
2018-11-04 20:02:43 -06:00
|
|
|
fn main() {
|
2019-05-28 13:46:13 -05:00
|
|
|
let _: &dyn Iterator<Item = i32, Item = i32>;
|
2023-10-31 08:45:26 -05:00
|
|
|
//~^ ERROR already specified
|
2018-11-06 17:17:11 -06:00
|
|
|
test();
|
2018-10-11 19:50:03 -05:00
|
|
|
}
|