From 5bb562ad496f9ec42ec59abfe31d3576266c6a6d Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Mon, 22 Mar 2021 20:50:59 -0300 Subject: Initial commit --- tests/99-goal.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/99-goal.rs (limited to 'tests/99-goal.rs') 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); + +impl_trait! { + impl Foo where T: Default { + impl trait Default { + fn default() -> Self { + Self(T::default()) + } + } + } +} + +fn main() {} -- cgit 1.4.1