blob: ee53213d8c27e3e32b2f004dbe84e3ae25912367 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
--> $DIR/let-else-brace-before-else.rs:6:29
|
LL | let Some(1) = { Some(1) } else {
| ^
|
help: wrap the expression in parentheses
|
LL | let Some(1) = ({ Some(1) }) else {
| + +
error: right curly brace `}` before `else` in a `let...else` statement not allowed
--> $DIR/let-else-brace-before-else.rs:10:34
|
LL | let 2 = 1 + match 1 { n => n } else {
| ^
|
help: wrap the expression in parentheses
|
LL | let 2 = 1 + (match 1 { n => n }) else {
| + +
error: right curly brace `}` before `else` in a `let...else` statement not allowed
--> $DIR/let-else-brace-before-else.rs:14:40
|
LL | let Some(1) = unsafe { unsafe_fn() } else {
| ^
|
help: wrap the expression in parentheses
|
LL | let Some(1) = (unsafe { unsafe_fn() }) else {
| + +
error: aborting due to 3 previous errors
|