summary refs log blame commit diff stats
path: root/tests/06-impl-trait.rs
blob: ca0d2eebcaa7d6b3a7a4d815673c0ca1bc645cb5 (plain) (tree)



















                                  
// Checks that `impl trait` works.

use impl_trait::impl_trait;

struct Foo;
trait Bar {
}

impl_trait! {
    impl Foo {
        impl trait Bar {
        }
    }
}

fn static_assert<T: Bar>(_t: T) {}

fn main() {
    static_assert(Foo);
}