blob: a4a8a5ac6ccbc42c127e2e631ca1747b4e051d39 [file] [log] [blame]
// run-pass
// Test HRTB used with the `Fn` trait.
fn foo<F:Fn(&isize)>(f: F) {
let x = 22;
f(&x);
}
fn main() {
foo(|x: &isize| println!("{}", *x));
}