]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/else-no-if.stderr
Auto merge of #100678 - GuillaumeGomez:improve-rustdoc-json-tests, r=aDotInTheVoid
[rust.git] / src / test / ui / parser / else-no-if.stderr
1 error: expected `{`, found keyword `false`
2   --> $DIR/else-no-if.rs:3:12
3    |
4 LL |     } else false {
5    |       ---- ^^^^^
6    |       |
7    |       expected an `if` or a block after this `else`
8    |
9 help: add an `if` if this is the condition of a chained `else if` statement
10    |
11 LL |     } else if false {
12    |            ++
13
14 error: expected `{`, found `falsy`
15   --> $DIR/else-no-if.rs:10:12
16    |
17 LL |     } else falsy() {
18    |       ---- ^^^^^
19    |       |
20    |       expected an `if` or a block after this `else`
21    |
22 help: add an `if` if this is the condition of a chained `else if` statement
23    |
24 LL |     } else if falsy() {
25    |            ++
26
27 error: expected `{`, found `falsy`
28   --> $DIR/else-no-if.rs:17:12
29    |
30 LL |     } else falsy();
31    |            ^^^^^ expected `{`
32    |
33 help: try placing this code inside a block
34    |
35 LL |     } else { falsy() };
36    |            +         +
37
38 error: expected `{`, found keyword `loop`
39   --> $DIR/else-no-if.rs:23:12
40    |
41 LL |     } else loop{}
42    |            ^^^^ expected `{`
43    |
44 help: try placing this code inside a block
45    |
46 LL |     } else { loop{} }
47    |            +        +
48
49 error: aborting due to 4 previous errors
50