259 lines
6.1 KiB
Plaintext
259 lines
6.1 KiB
Plaintext
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:9:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = ({
|
|
LL | 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: `for...else` loops are not supported
|
|
--> $DIR/bad-let-else-statement.rs:18:7
|
|
|
|
|
LL | let foo = for i in 1..2 {
|
|
| --- `else` is attached to this loop
|
|
LL | break;
|
|
LL | } else {
|
|
| _______^
|
|
LL | |
|
|
LL | | return;
|
|
LL | | };
|
|
| |_____^
|
|
|
|
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:29:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = (if true {
|
|
LL | 1
|
|
LL | } else {
|
|
LL | 0
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: `loop...else` loops are not supported
|
|
--> $DIR/bad-let-else-statement.rs:38:7
|
|
|
|
|
LL | let foo = loop {
|
|
| ---- `else` is attached to this loop
|
|
LL | break;
|
|
LL | } else {
|
|
| _______^
|
|
LL | |
|
|
LL | | return;
|
|
LL | | };
|
|
| |_____^
|
|
|
|
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:48:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = (match true {
|
|
LL | true => 1,
|
|
LL | false => 0
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:58:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = (X {
|
|
LL | a: 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: `while...else` loops are not supported
|
|
--> $DIR/bad-let-else-statement.rs:67:7
|
|
|
|
|
LL | let foo = while false {
|
|
| ----- `else` is attached to this loop
|
|
LL | break;
|
|
LL | } else {
|
|
| _______^
|
|
LL | |
|
|
LL | | return;
|
|
LL | | };
|
|
| |_____^
|
|
|
|
|
= note: consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:76:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = (const {
|
|
LL | 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:85:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = &({
|
|
LL | 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:95:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = bar = ({
|
|
LL | 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:104:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = 1 + ({
|
|
LL | 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:113:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = 1..({
|
|
LL | 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:122:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = return ({
|
|
LL | ()
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:131:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = -({
|
|
LL | 1
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:140:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = do yeet ({
|
|
LL | ()
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:149:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = become ({
|
|
LL | ()
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:158:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
|
|
|
help: wrap the expression in parentheses
|
|
|
|
|
LL ~ let foo = |x: i32| ({
|
|
LL | x
|
|
LL ~ }) else {
|
|
|
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:167:31
|
|
|
|
|
LL | let bad = format_args! {""} else { return; };
|
|
| ^
|
|
|
|
|
help: use parentheses instead of braces for this macro
|
|
|
|
|
LL | let bad = format_args! ("") else { return; };
|
|
| ~ ~
|
|
|
|
error: right curly brace `}` before `else` in a `let...else` statement not allowed
|
|
--> $DIR/bad-let-else-statement.rs:181:25
|
|
|
|
|
LL | let x = a! {} else { return; };
|
|
| ^
|
|
...
|
|
LL | b!(1); b!(2);
|
|
| ----- in this macro invocation
|
|
|
|
|
= note: this error originates in the macro `b` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
help: use parentheses instead of braces for this macro
|
|
|
|
|
LL | let x = a! () else { return; };
|
|
| ~~
|
|
|
|
error: aborting due to 19 previous errors
|
|
|