Skip to content

Commit 17b6bd6

Browse files
committed
Add ui test for missing expression in for loop
1 parent 7a75278 commit 17b6bd6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
for i in {
3+
//~^ ERROR missing expression to iterate on in `for` loop
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error: missing expression to iterate on in `for` loop
2+
--> $DIR/missing-expression-in-for-loop.rs:2:14
3+
|
4+
LL | for i in {
5+
| ^
6+
|
7+
help: try adding an expression to the `for` loop
8+
|
9+
LL | for i in /* expression */ {
10+
| ++++++++++++++++
11+
12+
error: aborting due to previous error
13+

0 commit comments

Comments
 (0)