rust/tests/ui/error-codes/E0719.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
328 B
Rust
Raw Normal View History

trait Foo: Iterator<Item = i32, Item = i32> {}
2018-11-27 09:56:36 +00:00
//~^ ERROR is already specified
//~| ERROR is already specified
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
Box::new(None.into_iter())
}
fn main() {
2019-05-28 18:46:13 +00:00
let _: &dyn Iterator<Item = i32, Item = i32>;
test();
}