summary refs log blame commit diff stats
path: root/tests/99-goal.rs
blob: 117d70bb5dc302ed9d4eb617e37ed564bdd5b2ca (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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() {}