2011-12-20 23:56:21 -06:00
|
|
|
// error-pattern: copying a noncopyable value
|
|
|
|
|
2012-07-16 22:17:57 -05:00
|
|
|
class foo { let x: int; new(x: int) { self.x = x; } drop { } }
|
|
|
|
|
|
|
|
fn to_lambda2(b: foo) -> fn@(uint) -> uint {
|
2011-12-20 23:56:21 -06:00
|
|
|
// test case where copy clause specifies a value that is not used
|
2012-01-09 18:12:37 -06:00
|
|
|
// in fn@ body, but value is illegal to copy:
|
2012-05-07 13:31:57 -05:00
|
|
|
ret fn@(u: uint, copy b) -> uint { 22u };
|
2011-12-20 23:56:21 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|