FileCheck inline_closure_captures

This commit is contained in:
Ryan Mehri 2023-10-20 11:30:04 -07:00
parent 9d61e6a4e4
commit 5caee416a5

View File

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