2020-07-02 00:32:12 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
2018-03-12 21:40:55 -05:00
|
|
|
fn main() {
|
|
|
|
let v = vec![0, 1, 2, 3];
|
|
|
|
|
2020-07-02 00:32:12 -05:00
|
|
|
for (i, _) in &v.iter().enumerate() {
|
2018-10-09 20:53:53 -05:00
|
|
|
//~^ ERROR `&std::iter::Enumerate<std::slice::Iter<'_, {integer}>>` is not an iterator
|
2018-03-12 21:40:55 -05:00
|
|
|
println!("{}", i);
|
|
|
|
}
|
|
|
|
}
|