mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
32 lines
764 B
Rust
32 lines
764 B
Rust
fn main() {
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
for _ in false {}
|
|
//~^ ERROR `bool` is not an iterator
|
|
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
other()
|
|
}
|
|
|
|
pub fn other() {
|
|
// check errors are still reported globally
|
|
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
for _ in false {}
|
|
//~^ ERROR `bool` is not an iterator
|
|
}
|