summary refs log tree commit diff stats
path: root/tests/99-goal.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/99-goal.rs')
-rw-r--r--tests/99-goal.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/99-goal.rs b/tests/99-goal.rs
new file mode 100644
index 0000000..117d70b
--- /dev/null
+++ b/tests/99-goal.rs
@@ -0,0 +1,17 @@
+// Checks that #[impl_trait] works with generics.
+
+use impl_trait::impl_trait;
+
+struct Foo<T>(T);
+
+impl_trait! {
+    impl<T> Foo<T> where T: Default {
+        impl trait Default {
+            fn default() -> Self {
+                Self(T::default())
+            }
+        }
+    }
+}
+
+fn main() {}