2021-08-01 19:18:50 -05:00
|
|
|
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 {
|
|
|
|
| ^
|
|
|
|
|
|
2022-09-01 12:29:23 -05:00
|
|
|
help: wrap the expression in parentheses
|
2021-08-01 19:18:50 -05:00
|
|
|
|
|
|
|
|
LL | let Some(1) = ({ Some(1) }) else {
|
|
|
|
| + +
|
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
2023-02-23 13:12:01 -06:00
|
|
|
--> $DIR/let-else-brace-before-else.rs:10:34
|
2021-08-01 19:18:50 -05:00
|
|
|
|
|
|
|
|
LL | let 2 = 1 + match 1 { n => n } else {
|
|
|
|
| ^
|
|
|
|
|
|
2022-09-01 12:29:23 -05:00
|
|
|
help: wrap the expression in parentheses
|
2021-08-01 19:18:50 -05:00
|
|
|
|
|
|
|
|
LL | let 2 = 1 + (match 1 { n => n }) else {
|
|
|
|
| + +
|
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
2023-02-23 13:12:01 -06:00
|
|
|
--> $DIR/let-else-brace-before-else.rs:14:40
|
2021-08-01 19:18:50 -05:00
|
|
|
|
|
|
|
|
LL | let Some(1) = unsafe { unsafe_fn() } else {
|
|
|
|
| ^
|
|
|
|
|
|
2022-09-01 12:29:23 -05:00
|
|
|
help: wrap the expression in parentheses
|
2021-08-01 19:18:50 -05:00
|
|
|
|
|
|
|
|
LL | let Some(1) = (unsafe { unsafe_fn() }) else {
|
|
|
|
| + +
|
|
|
|
|
2023-02-23 13:12:01 -06:00
|
|
|
error: aborting due to 3 previous errors
|
2021-08-01 19:18:50 -05:00
|
|
|
|