Add ui test for missing expression in for loop

This commit is contained in:
Obei Sideg 2023-02-03 12:25:01 +03:00
parent 7a75278836
commit 17b6bd6b70
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,5 @@
fn main() {
for i in {
//~^ ERROR missing expression to iterate on in `for` loop
}
}

View File

@ -0,0 +1,13 @@
error: missing expression to iterate on in `for` loop
--> $DIR/missing-expression-in-for-loop.rs:2:14
|
LL | for i in {
| ^
|
help: try adding an expression to the `for` loop
|
LL | for i in /* expression */ {
| ++++++++++++++++
error: aborting due to previous error