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