rust/tests/ui/issues/issue-80607.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
234 B
Rust
Raw Normal View History

// 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 10:06:30 +00:00
Enum::V1 { x } //~ ERROR `Enum::V1` has no field named `x`
}
fn main() {}