mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
16 lines
328 B
Rust
16 lines
328 B
Rust
trait Foo: Iterator<Item = i32, Item = i32> {}
|
|
//~^ ERROR is already specified
|
|
//~| 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();
|
|
}
|