mirror of https://github.com/rust-lang/rust.git
122 lines
3.2 KiB
Plaintext
122 lines
3.2 KiB
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/invalid.rs:120:21
|
|
|
|
|
LL | break 'blk;
|
|
| ^^^^^^^^^^ expected `State`, found `()`
|
|
|
|
|
help: give the `break` a value of the expected type
|
|
|
|
|
LL | break 'blk /* value */;
|
|
| +++++++++++
|
|
|
|
error: invalid update of the `#[loop_match]` state
|
|
--> $DIR/invalid.rs:18:9
|
|
|
|
|
LL | fake = 'blk: {
|
|
| ^^^^
|
|
LL |
|
|
LL | match state {
|
|
| ----- the assignment must update this variable
|
|
|
|
error: invalid match on `#[loop_match]` state
|
|
--> $DIR/invalid.rs:32:19
|
|
|
|
|
LL | match State::A {
|
|
| ^^^^^^^^
|
|
|
|
|
= note: a local variable must be the scrutinee within a `#[loop_match]`
|
|
|
|
error: statements are not allowed in this position within a `#[loop_match]`
|
|
--> $DIR/invalid.rs:44:9
|
|
|
|
|
LL | 1;
|
|
| ^^
|
|
|
|
error: statements are not allowed in this position within a `#[loop_match]`
|
|
--> $DIR/invalid.rs:59:13
|
|
|
|
|
LL | 1;
|
|
| ^^
|
|
|
|
error: this expression must be a single `match` wrapped in a labeled block
|
|
--> $DIR/invalid.rs:72:17
|
|
|
|
|
LL | state = State::B
|
|
| ^^^^^^^^
|
|
|
|
error: this expression must be a single `match` wrapped in a labeled block
|
|
--> $DIR/invalid.rs:82:13
|
|
|
|
|
LL | State::B
|
|
| ^^^^^^^^
|
|
|
|
error: this expression must be a single `match` wrapped in a labeled block
|
|
--> $DIR/invalid.rs:92:17
|
|
|
|
|
LL | state = 'blk: {
|
|
| _________________^
|
|
LL | |
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: expected a single assignment expression
|
|
--> $DIR/invalid.rs:101:9
|
|
|
|
|
LL | ()
|
|
| ^^
|
|
|
|
error: expected a single assignment expression
|
|
--> $DIR/invalid.rs:107:10
|
|
|
|
|
LL | loop {
|
|
| __________^
|
|
LL | |
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: a `#[const_continue]` must break to a label with a value
|
|
--> $DIR/invalid.rs:137:21
|
|
|
|
|
LL | break 'blk;
|
|
| ^^^^^^^^^^
|
|
|
|
error: match arms that are part of a `#[loop_match]` cannot have guards
|
|
--> $DIR/invalid.rs:155:29
|
|
|
|
|
LL | State::B if cond => break 'a,
|
|
| ^^^^
|
|
|
|
error[E0004]: non-exhaustive patterns: `State::B` and `State::C` not covered
|
|
--> $DIR/invalid.rs:168:19
|
|
|
|
|
LL | match state {
|
|
| ^^^^^ patterns `State::B` and `State::C` not covered
|
|
|
|
|
note: `State` defined here
|
|
--> $DIR/invalid.rs:7:6
|
|
|
|
|
LL | enum State {
|
|
| ^^^^^
|
|
LL | A,
|
|
LL | B,
|
|
| - not covered
|
|
LL | C,
|
|
| - not covered
|
|
= note: the matched value is of type `State`
|
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
|
|
|
|
LL ~ State::A => State::B,
|
|
LL ~ State::B | State::C => todo!(),
|
|
|
|
|
|
|
error[E0579]: lower range bound must be less than upper
|
|
--> $DIR/invalid.rs:185:17
|
|
|
|
|
LL | 4.0..3.0 => {
|
|
| ^^^^^^^^
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
Some errors have detailed explanations: E0004, E0308, E0579.
|
|
For more information about an error, try `rustc --explain E0004`.
|