mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
16 lines
241 B
Rust
16 lines
241 B
Rust
// 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();
|
|
};
|
|
}
|