mirror of
https://github.com/rust-lang/rust.git
synced 2026-07-12 10:42:39 -04:00
22 lines
710 B
Plaintext
22 lines
710 B
Plaintext
error[E0005]: refutable pattern in assignment
|
|
--> $DIR/refutable-enum-assignment.rs:9:5
|
|
|
|
|
LL | Foo::One = Foo::One;
|
|
| ^^^^^^^^ pattern `Foo::Two` not covered
|
|
|
|
|
= note: destructuring assignments require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
|
= note: for more information, visit https://doc.rust-lang.org/book/ch19-02-refutability.html
|
|
note: `Foo` defined here
|
|
--> $DIR/refutable-enum-assignment.rs:3:6
|
|
|
|
|
LL | enum Foo {
|
|
| ^^^
|
|
LL | One,
|
|
LL | Two,
|
|
| --- not covered
|
|
= note: the matched value is of type `Foo`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0005`.
|