]> git.lizzy.rs Git - rust.git/blob - src/test/compile-fail/cap-clause-illegal-cap.rs
Remove proto_sugar and 'lambda' as keyword, commit to fn@.
[rust.git] / src / test / compile-fail / cap-clause-illegal-cap.rs
1 // error-pattern: copying a noncopyable value
2
3 fn to_lambda2(b: block(uint) -> uint) -> fn@(uint) -> uint {
4     // test case where copy clause specifies a value that is not used
5     // in fn@ body, but value is illegal to copy:
6     ret fn@[copy b](u: uint) -> uint { 22u };
7 }
8
9 fn main() {
10 }