2015-09-24 11:58:00 -05:00
|
|
|
fn main() {
|
|
|
|
let _ = Iterator::next(&mut ());
|
2018-10-09 20:53:53 -05:00
|
|
|
//~^ ERROR `()` is not an iterator
|
2022-08-24 13:36:44 -05:00
|
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
//~| ERROR `()` is not an iterator
|
2015-09-24 11:58:00 -05:00
|
|
|
|
|
|
|
for _ in false {}
|
2018-10-09 20:53:53 -05:00
|
|
|
//~^ ERROR `bool` is not an iterator
|
2015-09-24 11:58:00 -05:00
|
|
|
|
|
|
|
let _ = Iterator::next(&mut ());
|
2018-10-09 20:53:53 -05:00
|
|
|
//~^ ERROR `()` is not an iterator
|
2022-08-24 13:36:44 -05:00
|
|
|
//~| ERROR `()` is not an iterator
|
2015-09-24 11:58:00 -05:00
|
|
|
|
|
|
|
other()
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn other() {
|
|
|
|
// check errors are still reported globally
|
|
|
|
|
|
|
|
let _ = Iterator::next(&mut ());
|
2018-10-09 20:53:53 -05:00
|
|
|
//~^ ERROR `()` is not an iterator
|
2022-08-24 13:36:44 -05:00
|
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
//~| ERROR `()` is not an iterator
|
2015-09-24 11:58:00 -05:00
|
|
|
|
|
|
|
let _ = Iterator::next(&mut ());
|
2018-10-09 20:53:53 -05:00
|
|
|
//~^ ERROR `()` is not an iterator
|
2022-08-24 13:36:44 -05:00
|
|
|
//~| ERROR `()` is not an iterator
|
2015-09-24 11:58:00 -05:00
|
|
|
|
|
|
|
for _ in false {}
|
2018-10-09 20:53:53 -05:00
|
|
|
//~^ ERROR `bool` is not an iterator
|
2015-09-24 11:58:00 -05:00
|
|
|
}
|