1 // run-pass
2 // Tests that the re-exports of `FnOnce` et al from the prelude work.
3 
4 // pretty-expanded FIXME #23616
5 
main()6 fn main() {
7     let task: Box<dyn Fn(isize) -> isize> = Box::new(|x| x);
8     task(0);
9 
10     let mut task: Box<dyn FnMut(isize) -> isize> = Box::new(|x| x);
11     task(0);
12 
13     call(|x| x, 22);
14 }
15 
call<F:FnOnce(isize) -> isize>(f: F, x: isize) -> isize16 fn call<F:FnOnce(isize) -> isize>(f: F, x: isize) -> isize {
17     f(x)
18 }
19