summary refs log tree commit diff
path: root/src/test/compile-fail/block-arg-used-as-lambda-with-illegal-cap.rs
blob: 2abaabc3ef85a6e7db1d381958c0f3500a2c0335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// error-pattern: copying a noncopyable value

fn to_lambda1(f: fn@(uint) -> uint) -> fn@(uint) -> uint {
    ret f;
}

fn to_lambda2(b: fn(uint) -> uint) -> fn@(uint) -> uint {
    ret to_lambda1({|x| b(x)});
}

fn main() {
}