blob: ac016258b7f92ab35f99dd7eb2cee0b66bde8d07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// NOTE commented out due to issue #45994
//pub fn fourway_add(a: i32) -> impl Fn(i32) -> impl Fn(i32) -> impl Fn(i32) -> i32 {
// move |b| move |c| move |d| a + b + c + d
//}
fn some_internal_fn() -> u32 {
1
}
fn other_internal_fn() -> u32 {
1
}
// See #40839
pub fn return_closure_accessing_internal_fn() -> impl Fn() -> u32 {
|| {
some_internal_fn() + 1
}
}
pub fn return_internal_fn() -> impl Fn() -> u32 {
other_internal_fn
}
|