]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/block-no-opening-brace.stderr
Rollup merge of #107455 - tshepang:better-name, r=wesleywiser
[rust.git] / tests / ui / parser / block-no-opening-brace.stderr
1 error: expected `{`, found keyword `let`
2   --> $DIR/block-no-opening-brace.rs:9:9
3    |
4 LL |     loop
5    |     ---- while parsing this `loop` expression
6 LL |         let x = 0;
7    |         ^^^ expected `{`
8    |
9 help: try placing this code inside a block
10    |
11 LL |         { let x = 0; }
12    |         +            +
13
14 error: expected `{`, found keyword `let`
15   --> $DIR/block-no-opening-brace.rs:15:9
16    |
17 LL |     while true
18    |     ----- ---- this `while` condition successfully parsed
19    |     |
20    |     while parsing the body of this `while` expression
21 LL |         let x = 0;
22    |         ^^^ expected `{`
23    |
24 help: try placing this code inside a block
25    |
26 LL |         { let x = 0; }
27    |         +            +
28
29 error: expected `{`, found keyword `let`
30   --> $DIR/block-no-opening-brace.rs:20:9
31    |
32 LL |         let x = 0;
33    |         ^^^ expected `{`
34    |
35 help: try placing this code inside a block
36    |
37 LL |         { let x = 0; }
38    |         +            +
39
40 error: expected expression, found reserved keyword `try`
41   --> $DIR/block-no-opening-brace.rs:24:5
42    |
43 LL |     try
44    |     ^^^ expected expression
45
46 error: expected one of `move`, `|`, or `||`, found keyword `let`
47   --> $DIR/block-no-opening-brace.rs:30:9
48    |
49 LL |     async
50    |          - expected one of `move`, `|`, or `||`
51 LL |         let x = 0;
52    |         ^^^ unexpected token
53
54 error: aborting due to 5 previous errors
55