blob: aa3f2f7c526f65505eee7479b7a61d50583fb2b9 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
 | // https://github.com/rust-lang/rust/issues/80607
// 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() {}
 |