Rollup merge of #75320 - estebank:js-for-i-of-x, r=davidtwco
Detect likely `for foo of bar` JS syntax Fix #75311.
This commit is contained in:
commit
d8ac403fd1
5 changed files with 25 additions and 7 deletions
|
|
@ -3,4 +3,6 @@
|
|||
fn main() {
|
||||
for _i in 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
for _i in 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@
|
|||
fn main() {
|
||||
for _i 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
for _i of 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,5 +4,11 @@ error: missing `in` in `for` loop
|
|||
LL | for _i 0..2 {
|
||||
| ^ help: try adding `in` here
|
||||
|
||||
error: aborting due to previous error
|
||||
error: missing `in` in `for` loop
|
||||
--> $DIR/issue-40782.rs:6:12
|
||||
|
|
||||
LL | for _i of 0..2 {
|
||||
| ^^ help: try using `in` here instead
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue