Closed
Description
For
fn foo() {
for i in 0 .. 9us {
println!("{}", i)
}
}
it compiles fine, and for
fn bar(len: usize) {
for i in 0 .. len {
println!("{}", i)
}
}
compiler shows
3:10: 3:11 error: expected `:`, found `!`
It should give a tip that parentheses are missing anyway.
Rustc version:
rustc 1.0.0-dev (1028e185f 2015-01-20 18:12:41 +0800)
binary: rustc
commit-hash: 1028e185f91482551f629e97b8c3ad7ce0ade2f7
commit-date: 2015-01-20 18:12:41 +0800
host: i686-pc-windows-gnu
release: 1.0.0-dev
Metadata
Metadata
Assignees
Labels
No labels