1 #![feature(fn_traits, unboxed_closures)]
3 fn test<F: for<'x> FnOnce<(&'x str,)>>(_: F) {}
5 struct Compose<F, G>(F, G);
6 impl<T, F, G> FnOnce<(T,)> for Compose<F, G>
9 G: FnOnce<(F::Output,)>,
11 type Output = G::Output;
12 extern "rust-call" fn call_once(self, (x,): (T,)) -> G::Output {
17 fn bad<T>(f: fn(&'static str) -> T) {
18 test(Compose(f, |_| {}));
19 //~^ ERROR: implementation of `FnOnce` is not general enough