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