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

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

15 lines
296 B
Rust
Raw Normal View History

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