• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // compile-flags: -Z span_free_formats
2 
3 // Tests that MIR inliner can handle closure captures.
4 
main()5 fn main() {
6     println!("{:?}", foo(0, 14));
7 }
8 
9 // EMIT_MIR inline_closure_captures.foo.Inline.after.mir
foo<T: Copy>(t: T, q: i32) -> (i32, T)10 fn foo<T: Copy>(t: T, q: i32) -> (i32, T) {
11     let x = |_q| (q, t);
12     x(q)
13 }
14