summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/rec-auto.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/structs-enums/rec-auto.rs')
-rw-r--r--tests/ui/structs-enums/rec-auto.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/structs-enums/rec-auto.rs b/tests/ui/structs-enums/rec-auto.rs
new file mode 100644
index 000000000..c2ef13ede
--- /dev/null
+++ b/tests/ui/structs-enums/rec-auto.rs
@@ -0,0 +1,14 @@
+// run-pass
+
+
+
+
+// Issue #50.
+
+struct X { foo: String, bar: String }
+
+pub fn main() {
+ let x = X {foo: "hello".to_string(), bar: "world".to_string()};
+ println!("{}", x.foo.clone());
+ println!("{}", x.bar.clone());
+}