]> git.proxmox.com Git - rustc.git/blame - 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
CommitLineData
7453a54e
SL
1#![crate_type = "lib"]
2
3#[inline]
4pub fn inlined_fn(x: i32, y: i32) -> i32 {
5
6 let closure = |a, b| { a + b };
7
8 closure(x, y)
9}
10
11pub 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
18pub fn non_inlined_fn(x: i32, y: i32) -> i32 {
19
20 let closure = |a, b| { a + b };
21
22 closure(x, y)
23}