summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/unit-like-struct.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/structs-enums/unit-like-struct.rs')
-rw-r--r--tests/ui/structs-enums/unit-like-struct.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/structs-enums/unit-like-struct.rs b/tests/ui/structs-enums/unit-like-struct.rs
new file mode 100644
index 000000000..636ec9926
--- /dev/null
+++ b/tests/ui/structs-enums/unit-like-struct.rs
@@ -0,0 +1,9 @@
+// run-pass
+struct Foo;
+
+pub fn main() {
+ let x: Foo = Foo;
+ match x {
+ Foo => { println!("hi"); }
+ }
+}