rust/tests/ui/impl-trait/deduce-signature-from-supertrait.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
241 B
Rust
Raw Normal View History

// check-pass
#![feature(type_alias_impl_trait)]
trait SuperExpectation: Fn(i32) {}
impl<T: Fn(i32)> SuperExpectation for T {}
type Foo = impl SuperExpectation;
fn main() {
let _: Foo = |x| {
let _ = x.to_string();
};
}