]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/for-loop.rs
Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
[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 }