blob: ba473653ecfe328ff545df1011a644ab097e6cf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// compile-flags: -Ztrait-solver=next
#![feature(fn_traits)]
#![feature(unboxed_closures)]
#![feature(tuple_trait)]
use std::ops::Fn;
use std::marker::Tuple;
fn foo<F: Fn<T>, T: Tuple>(f: Option<F>, t: T) {
let y = (f.unwrap()).call(t);
}
fn main() {
foo::<fn() -> str, _>(None, ());
//~^ expected a `Fn<_>` closure, found `fn() -> str`
}
|