rust/tests/ui/error-codes/E0719.rs
2023-01-11 09:32:08 +00:00

15 lines
296 B
Rust

trait Foo: Iterator<Item = i32, Item = i32> {}
//~^ ERROR is already specified
type Unit = ();
fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
//~^ ERROR is already specified
Box::new(None.into_iter())
}
fn main() {
let _: &dyn Iterator<Item = i32, Item = i32>;
test();
}