mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
9 lines
261 B
Rust
9 lines
261 B
Rust
// for-loops are expanded in the front end, and use an `iter` ident in their expansion. Check that
|
|
// `iter` is not accessible inside the for loop.
|
|
|
|
fn main() {
|
|
for _ in 0..10 {
|
|
iter.next(); //~ ERROR cannot find value `iter` in this scope
|
|
}
|
|
}
|