]> git.proxmox.com Git - rustc.git/blob - src/test/codegen-units/item-collection/auxiliary/cgu_extern_closures.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / codegen-units / item-collection / auxiliary / cgu_extern_closures.rs
1 #![crate_type = "lib"]
2
3 #[inline]
4 pub fn inlined_fn(x: i32, y: i32) -> i32 {
5
6 let closure = |a, b| { a + b };
7
8 closure(x, y)
9 }
10
11 pub fn inlined_fn_generic<T>(x: i32, y: i32, z: T) -> (i32, T) {
12
13 let closure = |a, b| { a + b };
14
15 (closure(x, y), z)
16 }
17
18 pub fn non_inlined_fn(x: i32, y: i32) -> i32 {
19
20 let closure = |a, b| { a + b };
21
22 closure(x, y)
23 }