blob: 08bea4f1678b67467a00716e6aeffd8235108c9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![feature(fn_traits, unboxed_closures, tuple_trait)]
use std::default::Default;
use std::marker::Tuple;
fn wrap<P: Tuple + Default, T>(func: impl Fn<P, Output = T>) {
let x: P = Default::default();
// Should be: `func.call(x);`
func(x);
//~^ ERROR cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit
}
fn foo() {}
fn main() {
wrap(foo);
}
|