]> git.lizzy.rs Git - rust.git/blob - src/test/ui/higher-rank-trait-bounds/hrtb-unboxed-closure-trait.rs
Merge commit '48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267' into libgccjit-codegen
[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 }