rust/tests/ui/issues/issue-2848.rs
2025-04-08 23:06:31 +03:00

18 lines
354 B
Rust

#[allow(non_camel_case_types)]
mod bar {
pub enum foo {
alpha,
beta,
charlie
}
}
fn main() {
use bar::foo::{alpha, charlie};
match alpha {
alpha | beta => {} //~ ERROR variable `beta` is not bound in all patterns
//~^ ERROR `beta` is named the same as one of the variants
charlie => {}
}
}