rust/src/test/ui/issues/issue-28098.rs
2018-12-25 21:08:33 -07:00

26 lines
530 B
Rust

fn main() {
let _ = Iterator::next(&mut ());
//~^ ERROR `()` is not an iterator
for _ in false {}
//~^ ERROR `bool` is not an iterator
let _ = Iterator::next(&mut ());
//~^ ERROR `()` is not an iterator
other()
}
pub fn other() {
// check errors are still reported globally
let _ = Iterator::next(&mut ());
//~^ ERROR `()` is not an iterator
let _ = Iterator::next(&mut ());
//~^ ERROR `()` is not an iterator
for _ in false {}
//~^ ERROR `bool` is not an iterator
}