summaryrefslogtreecommitdiffstats
path: root/vendor/derive_more/tests/constructor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/derive_more/tests/constructor.rs')
-rw-r--r--vendor/derive_more/tests/constructor.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/derive_more/tests/constructor.rs b/vendor/derive_more/tests/constructor.rs
new file mode 100644
index 000000000..07fddb883
--- /dev/null
+++ b/vendor/derive_more/tests/constructor.rs
@@ -0,0 +1,21 @@
+#![allow(dead_code)]
+#[macro_use]
+extern crate derive_more;
+
+#[derive(Constructor)]
+struct EmptyTuple();
+
+#[derive(Constructor)]
+struct EmptyStruct {}
+
+#[derive(Constructor)]
+struct EmptyUnit;
+
+#[derive(Constructor)]
+struct MyInts(i32, i32);
+
+#[derive(Constructor)]
+struct Point2D {
+ x: i32,
+ y: i32,
+}