diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-80607.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-80607.rs b/src/test/ui/issues/issue-80607.rs new file mode 100644 index 000000000..63f4df359 --- /dev/null +++ b/src/test/ui/issues/issue-80607.rs @@ -0,0 +1,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() {} |