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,
17 println!("{}", foo(0, &14));
20 fn foo<T: Copy>(_t: T, q: &i32) -> i32 {
21 let x = |r: &i32, _s: &i32| {
29 // START rustc.foo.Inline.after.mir
33 // _3 = [closure@NodeId(39)];
40 // _5 = (move _6, move _7);
41 // _8 = move (_5.0: &i32);
42 // _9 = move (_5.1: &i32);
48 // END rustc.foo.Inline.after.mir