about summary refs log tree commit diff
path: root/tests/ui/impl-trait/deduce-signature-from-supertrait.rs
blob: 4e452994f72e7247e9e61326ee65611c72626ab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@ check-pass

#![feature(type_alias_impl_trait)]

trait SuperExpectation: Fn(i32) {}

impl<T: Fn(i32)> SuperExpectation for T {}

type Foo = impl SuperExpectation;

fn bop(_: Foo) {
    let _: Foo = |x| {
        let _ = x.to_string();
    };
}

fn main() {}