]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/inline/inline_closure.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / mir-opt / inline / inline_closure.rs
1 // compile-flags: -Z span_free_formats
2
3 // Tests that MIR inliner can handle closure arguments. (#45894)
4
5 fn main() {
6     println!("{}", foo(0, 14));
7 }
8
9 // EMIT_MIR inline_closure.foo.Inline.after.mir
10 fn foo<T: Copy>(_t: T, q: i32) -> i32 {
11     let x = |_t, _q| _t;
12     x(q, q)
13 }