]> git.lizzy.rs Git - rust.git/blob - src/test/ui/higher-rank-trait-bounds/hrtb-unboxed-closure-trait.rs
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
[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 }