summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-80607.rs
blob: 63f4df359b831ed2b9fe1cb8a5768c29d6ad8af7 (plain)
1
2
3
4
5
6
7
8
9
10
// 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() {}