e324a59eb6
- Add doc comment to new type - Restore "only supported directly in conditions of `if` and `while` expressions" note - Rename variant with clearer name
257 lines
10 KiB
Plaintext
257 lines
10 KiB
Plaintext
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:10:16
|
|
|
|
|
LL | () if (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:10:16
|
|
|
|
|
LL | () if (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:13:18
|
|
|
|
|
LL | () if (((let 0 = 1))) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:13:18
|
|
|
|
|
LL | () if (((let 0 = 1))) => {}
|
|
| ^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:24:16
|
|
|
|
|
LL | () if (let 0 = 1) && true => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:24:16
|
|
|
|
|
LL | () if (let 0 = 1) && true => {}
|
|
| ^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:27:24
|
|
|
|
|
LL | () if true && (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:27:24
|
|
|
|
|
LL | () if true && (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:30:16
|
|
|
|
|
LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:30:16
|
|
|
|
|
LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:30:31
|
|
|
|
|
LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:30:31
|
|
|
|
|
LL | () if (let 0 = 1) && (let 0 = 1) => {}
|
|
| ^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:34:42
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:34:42
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:34:55
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:34:42
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:34:68
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
|
--> $DIR/feature-gate.rs:34:42
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:60:16
|
|
|
|
|
LL | use_expr!((let 0 = 1 && 0 == 0));
|
|
| ^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
|
|
error: expected expression, found `let` statement
|
|
--> $DIR/feature-gate.rs:62:16
|
|
|
|
|
LL | use_expr!((let 0 = 1));
|
|
| ^^^
|
|
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
|
|
|
error: no rules expected the token `let`
|
|
--> $DIR/feature-gate.rs:70:15
|
|
|
|
|
LL | macro_rules! use_expr {
|
|
| --------------------- when calling this macro
|
|
...
|
|
LL | use_expr!(let 0 = 1);
|
|
| ^^^ no rules expected this token in macro call
|
|
|
|
|
note: while trying to match meta-variable `$e:expr`
|
|
--> $DIR/feature-gate.rs:53:10
|
|
|
|
|
LL | ($e:expr) => {
|
|
| ^^^^^^^
|
|
|
|
error[E0658]: `if let` guards are experimental
|
|
--> $DIR/feature-gate.rs:7:12
|
|
|
|
|
LL | () if let 0 = 1 => {}
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
|
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
|
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
|
|
|
error[E0658]: `if let` guards are experimental
|
|
--> $DIR/feature-gate.rs:16:12
|
|
|
|
|
LL | () if true && let 0 = 1 => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
|
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
|
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
|
|
|
error[E0658]: `if let` guards are experimental
|
|
--> $DIR/feature-gate.rs:20:12
|
|
|
|
|
LL | () if let 0 = 1 && true => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
|
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
|
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
|
|
|
error[E0658]: `if let` guards are experimental
|
|
--> $DIR/feature-gate.rs:34:12
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
|
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
|
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
|
|
|
error[E0658]: `if let` guards are experimental
|
|
--> $DIR/feature-gate.rs:43:12
|
|
|
|
|
LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
|
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
|
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
|
|
|
error[E0658]: `if let` guards are experimental
|
|
--> $DIR/feature-gate.rs:66:12
|
|
|
|
|
LL | () if let 0 = 1 => {}
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
|
|
= help: add `#![feature(if_let_guard)]` to the crate attributes to enable
|
|
= help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`
|
|
|
|
error[E0658]: `let` expressions in this position are unstable
|
|
--> $DIR/feature-gate.rs:16:23
|
|
|
|
|
LL | () if true && let 0 = 1 => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
|
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
|
|
|
error[E0658]: `let` expressions in this position are unstable
|
|
--> $DIR/feature-gate.rs:20:15
|
|
|
|
|
LL | () if let 0 = 1 && true => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
|
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
|
|
|
error[E0658]: `let` expressions in this position are unstable
|
|
--> $DIR/feature-gate.rs:34:15
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
|
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
|
|
|
error[E0658]: `let` expressions in this position are unstable
|
|
--> $DIR/feature-gate.rs:34:28
|
|
|
|
|
LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
|
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
|
|
|
error[E0658]: `let` expressions in this position are unstable
|
|
--> $DIR/feature-gate.rs:43:15
|
|
|
|
|
LL | () if let Range { start: _, end: _ } = (true..true) && false => {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
|
= help: add `#![feature(let_chains)]` to the crate attributes to enable
|
|
|
|
error: aborting due to 23 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0658`.
|