rust/tests/ui/pattern/enum-variant-not-found.rs
2026-01-18 06:23:47 +01:00

13 lines
218 B
Rust

//! regression test for <https://github.com/rust-lang/rust/issues/34209>
enum S {
A,
}
fn bug(l: S) {
match l {
S::B {} => {}, //~ ERROR no variant named `B` found for enum `S`
}
}
fn main () {}