]> git.lizzy.rs Git - rust.git/blob - src/test/ui/higher-rank-trait-bounds/hrtb-unboxed-closure-trait.rs
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01
[rust.git] / src / test / ui / higher-rank-trait-bounds / hrtb-unboxed-closure-trait.rs
1 // run-pass
2 // Test HRTB used with the `Fn` trait.
3
4 fn foo<F:Fn(&isize)>(f: F) {
5     let x = 22;
6     f(&x);
7 }
8
9 fn main() {
10     foo(|x: &isize| println!("{}", *x));
11 }