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

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

18 lines
393 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
//~| ERROR is already specified
//~| 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>;
//~^ ERROR already specified
test();
}