2012-05-29 17:37:50 -05:00
|
|
|
fn take(-_x: int) { }
|
|
|
|
|
|
|
|
fn from_by_value_arg(++x: int) {
|
2012-06-30 06:23:59 -05:00
|
|
|
take(x); //~ ERROR illegal move from argument `x`, which is not copy or move mode
|
2012-05-29 17:37:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn from_by_ref_arg(&&x: int) {
|
2012-06-30 06:23:59 -05:00
|
|
|
take(x); //~ ERROR illegal move from argument `x`, which is not copy or move mode
|
2012-05-29 17:37:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn from_copy_arg(+x: int) {
|
|
|
|
take(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn from_move_arg(-x: int) {
|
|
|
|
take(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|