2012-05-29 15:37:50 -07:00
|
|
|
fn take(-_x: int) { }
|
|
|
|
|
|
|
|
fn from_by_value_arg(++x: int) {
|
2012-09-18 22:44:46 -07:00
|
|
|
take(move x); //~ ERROR illegal move from argument `x`, which is not copy or move mode
|
2012-05-29 15:37:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn from_by_ref_arg(&&x: int) {
|
2012-09-18 22:44:46 -07:00
|
|
|
take(move x); //~ ERROR illegal move from argument `x`, which is not copy or move mode
|
2012-05-29 15:37:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn from_copy_arg(+x: int) {
|
2012-09-18 22:44:46 -07:00
|
|
|
take(move x);
|
2012-05-29 15:37:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn from_move_arg(-x: int) {
|
2012-09-18 22:44:46 -07:00
|
|
|
take(move x);
|
2012-05-29 15:37:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|