rust/tests/ui/issues/issue-80607.rs
2023-01-11 09:32:08 +00:00

11 lines
234 B
Rust

// This tests makes sure the diagnostics print the offending enum variant, not just the type.
pub enum Enum {
V1(i32),
}
pub fn foo(x: i32) -> Enum {
Enum::V1 { x } //~ ERROR `Enum::V1` has no field named `x`
}
fn main() {}