summary refs log tree commit diff
path: root/src/test/compile-fail/cap-clause-illegal-cap.rs
blob: 6f4972fdf66e76d9ed78de289fc530a2b41f5279 (plain)
1
2
3
4
5
6
7
8
9
10
// error-pattern: copying a noncopyable value

fn to_lambda2(b: block(uint) -> uint) -> fn@(uint) -> uint {
    // test case where copy clause specifies a value that is not used
    // in fn@ body, but value is illegal to copy:
    ret fn@[copy b](u: uint) -> uint { 22u };
}

fn main() {
}