mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 23:03:06 +03:00
15 lines
303 B
Rust
15 lines
303 B
Rust
//@ run-pass
|
|
//Test that checks pattern matching works correctly on a repr(u8) enum
|
|
// whose only variant contains an inner 'u8' field
|
|
//https://github.com/rust-lang/rust/issues/34571
|
|
#[repr(u8)]
|
|
enum Foo {
|
|
Foo(#[allow(dead_code)] u8),
|
|
}
|
|
|
|
fn main() {
|
|
match Foo::Foo(1) {
|
|
_ => ()
|
|
}
|
|
}
|