rust/src/test/ui/impl-trait/issues/issue-53457.rs

16 lines
171 B
Rust
Raw Normal View History

// check-pass
2019-06-03 19:54:28 +01:00
2019-07-30 00:11:58 +01:00
#![feature(type_alias_impl_trait)]
2019-06-03 19:54:28 +01:00
2019-07-30 00:11:58 +01:00
type X = impl Clone;
2019-06-03 19:54:28 +01:00
fn bar<F: Fn(&i32) + Clone>(f: F) -> F {
f
}
fn foo() -> X {
bar(|_| ())
2019-06-03 19:54:28 +01:00
}
fn main() {}