1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // compile-flags: -Z span_free_formats
13 // Tests that MIR inliner can handle closure arguments. (#45894)
16 println!("{}", foo(0, 14));
19 fn foo<T: Copy>(_t: T, q: i32) -> i32 {
25 // START rustc.foo.Inline.after.mir
29 // _3 = [closure@NodeId(28)];
36 // _5 = (move _6, move _7);
37 // _8 = move (_5.0: i32);
38 // _9 = move (_5.1: i32);
44 // END rustc.foo.Inline.after.mir