2021-01-02 03:58:50 -06:00
|
|
|
// 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 {
|
2021-01-02 04:06:30 -06:00
|
|
|
Enum::V1 { x } //~ ERROR `Enum::V1` has no field named `x`
|
2021-01-02 03:58:50 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|