blob: 32b217979761c026c54775c62842f770702a0cb8 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// error-pattern: copying a noncopyable value
fn to_lambda2(b: fn(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() {
}
|