blob: 73152fba0edc4ffcb0524abef7df16c6c8064013 (
plain)
1
2
3
4
5
6
7
8
9
10
|
fn to_lambda1(f: fn@(uint) -> uint) -> fn@(uint) -> uint {
return f;
}
fn to_lambda2(b: fn(uint) -> uint) -> fn@(uint) -> uint {
return to_lambda1({|x| b(x)}); //~ ERROR value may contain borrowed pointers
}
fn main() {
}
|