]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/for-loop.rs
Merge commit 'c2c07fa9d095931eb5684a42942a7b573a0c5238' into clippyup
[rust.git] / src / test / ui / hygiene / for-loop.rs
1 // for-loops are expanded in the front end, and use an `iter` ident in their expansion. Check that
2 // `iter` is not accessible inside the for loop.
3
4 fn main() {
5     for _ in 0..10 {
6         iter.next();  //~ ERROR cannot find value `iter` in this scope
7     }
8 }