mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
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:40
|
|
|
|
|
LL | let Some(1) = loop { break Some(1) } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL | let Some(1) = (loop { break Some(1) }) else {
|
|
| + +
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/let-else-brace-before-else.rs:14: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:18: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 4 previous errors
|
|
|