summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/match-struct.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/match/match-struct.rs')
-rw-r--r--src/test/ui/match/match-struct.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/match/match-struct.rs b/src/test/ui/match/match-struct.rs
new file mode 100644
index 000000000..7a54c54b9
--- /dev/null
+++ b/src/test/ui/match/match-struct.rs
@@ -0,0 +1,11 @@
+struct S { a: isize }
+enum E { C(isize) }
+
+fn main() {
+ match (S { a: 1 }) {
+ E::C(_) => (),
+ //~^ ERROR mismatched types
+ //~| expected struct `S`, found enum `E`
+ _ => ()
+ }
+}