]>
git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/inline/inline-closure.rs
1 // compile-flags: -Z span_free_formats
3 // Tests that MIR inliner can handle closure arguments. (#45894)
6 println
!("{}", foo(0, 14));
9 fn foo
<T
: Copy
>(_t
: T
, q
: i32) -> i32 {
15 // START rustc.foo.Inline.after.mir
16 // fn foo(_1: T, _2: i32) -> i32{
20 // let _3: [closure@foo<T>::{{closure}}#0];
21 // let mut _4: &[closure@foo<T>::{{closure}}#0];
22 // let mut _5: (i32, i32);
36 // _3 = [closure@foo::<T>::{{closure}}#0];
43 // _5 = (move _6, move _7);
44 // _8 = move (_5.0: i32);
45 // _9 = move (_5.1: i32);
50 // END rustc.foo.Inline.after.mir