Match up enums in the example.

This commit is contained in:
Predrag Gruevski 2022-07-18 11:54:35 -04:00 committed by Eric Huss
parent 512f12246e
commit 2451c2d3ba

View File

@ -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
}
};
}
```