mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Match up enums in the example.
This commit is contained in:
parent
512f12246e
commit
2451c2d3ba
@ -1141,15 +1141,15 @@ pub struct Foo {
|
||||
}
|
||||
|
||||
pub enum Bar {
|
||||
Baz,
|
||||
}
|
||||
|
||||
pub enum Quux {
|
||||
X,
|
||||
Y(usize),
|
||||
Z { a: usize },
|
||||
}
|
||||
|
||||
pub enum Quux {
|
||||
Var,
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// After
|
||||
#[non_exhaustive]
|
||||
@ -1183,7 +1183,7 @@ fn main() {
|
||||
match q {
|
||||
Quux::Var => 0,
|
||||
// Error: non-exhaustive patterns: `_` not covered
|
||||
}
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user