blob: 05ea0a89ff29c79a35eae7e50496016a15e544ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#![crate_type = "lib"]
#[inline]
pub fn inlined_fn(x: i32, y: i32) -> i32 {
let closure = |a, b| { a + b };
closure(x, y)
}
pub fn inlined_fn_generic<T>(x: i32, y: i32, z: T) -> (i32, T) {
let closure = |a, b| { a + b };
(closure(x, y), z)
}
pub fn non_inlined_fn(x: i32, y: i32) -> i32 {
let closure = |a, b| { a + b };
closure(x, y)
}
|