FileCheck inline_closure

This commit is contained in:
Ryan Mehri 2023-10-20 11:31:05 -07:00
parent 5caee416a5
commit 7ee05d24b5

View File

@ -1,4 +1,3 @@
// skip-filecheck
// compile-flags: -Z span_free_formats
// Tests that MIR inliner can handle closure arguments. (#45894)
@ -10,5 +9,8 @@ fn main() {
// EMIT_MIR inline_closure.foo.Inline.after.mir
fn foo<T: Copy>(_t: T, q: i32) -> i32 {
let x = |_t, _q| _t;
// CHECK-LABEL: fn foo(
// CHECK: (inlined foo::<T>::{closure#0})
x(q, q)
}