blob: 63f4df359b831ed2b9fe1cb8a5768c29d6ad8af7 [file] [log] [blame]
// 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() {}