mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
FileCheck inline_closure_captures
This commit is contained in:
parent
9d61e6a4e4
commit
5caee416a5
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user