diff --git a/src/test/compile-fail/borrowck-issue-2657-1.rs b/src/test/compile-fail/borrowck-issue-2657-1.rs index a7b78317e447..4ebc31a37391 100644 --- a/src/test/compile-fail/borrowck-issue-2657-1.rs +++ b/src/test/compile-fail/borrowck-issue-2657-1.rs @@ -2,7 +2,7 @@ fn main() { let x = Some(~1); match x { //~ NOTE loan of immutable local variable granted here Some(ref _y) => { - let _a = move x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan + let _a = x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan } _ => {} } diff --git a/src/test/compile-fail/borrowck-issue-2657-2.rs b/src/test/compile-fail/borrowck-issue-2657-2.rs index 019ae3160988..e7f9bf317989 100644 --- a/src/test/compile-fail/borrowck-issue-2657-2.rs +++ b/src/test/compile-fail/borrowck-issue-2657-2.rs @@ -2,7 +2,7 @@ fn main() { let x = Some(~1); match x { Some(ref y) => { - let _b = move *y; //~ ERROR moving out of dereference of immutable & pointer + let _b = *y; //~ ERROR moving out of dereference of immutable & pointer } _ => {} } diff --git a/src/test/compile-fail/borrowck-loan-blocks-move.rs b/src/test/compile-fail/borrowck-loan-blocks-move.rs index e48756bbbeb3..02e8b2480afc 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move.rs @@ -1,10 +1,10 @@ -fn take(-_v: ~int) { +fn take(_v: ~int) { } fn box_imm() { let v = ~3; let _w = &v; //~ NOTE loan of immutable local variable granted here - take(move v); //~ ERROR moving out of immutable local variable prohibited due to outstanding loan + take(v); //~ ERROR moving out of immutable local variable prohibited due to outstanding loan } fn main() { diff --git a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs index 0e2685b23280..0be10738435c 100644 --- a/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs +++ b/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs @@ -4,7 +4,7 @@ struct Point { } impl Point : ops::Add { - pure fn add(z: &int) -> int { + pure fn add(&self, z: &int) -> int { self.x + self.y + (*z) } } diff --git a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs index c91c4819661e..51fd42f8dfd3 100644 --- a/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs +++ b/src/test/compile-fail/borrowck-no-cycle-in-exchange-heap.rs @@ -7,7 +7,7 @@ fn main() { // Create a cycle! match *x { //~ NOTE loan of immutable local variable granted here node(ref y) => { - y.a = move x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan + y.a = x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan } empty => {} }; diff --git a/src/test/compile-fail/borrowck-unary-move-2.rs b/src/test/compile-fail/borrowck-unary-move-2.rs index eedeac84f834..9974828d8f7f 100644 --- a/src/test/compile-fail/borrowck-unary-move-2.rs +++ b/src/test/compile-fail/borrowck-unary-move-2.rs @@ -18,5 +18,5 @@ enum wrapper = noncopyable; fn main() { let x1 = wrapper(noncopyable()); - let _x2 = move *x1; //~ ERROR moving out of enum content + let _x2 = *x1; //~ ERROR moving out of enum content } diff --git a/src/test/compile-fail/borrowck-unary-move.rs b/src/test/compile-fail/borrowck-unary-move.rs index 1c8117fd8208..6f6b367f548b 100644 --- a/src/test/compile-fail/borrowck-unary-move.rs +++ b/src/test/compile-fail/borrowck-unary-move.rs @@ -1,6 +1,6 @@ fn foo(+x: ~int) -> int { let y = &*x; //~ NOTE loan of argument granted here - free(move x); //~ ERROR moving out of argument prohibited due to outstanding loan + free(x); //~ ERROR moving out of argument prohibited due to outstanding loan *y } @@ -8,4 +8,4 @@ fn free(+_x: ~int) { } fn main() { -} \ No newline at end of file +} diff --git a/src/test/compile-fail/issue-2587-2.rs b/src/test/compile-fail/issue-2587-2.rs deleted file mode 100644 index d8d2f82da97b..000000000000 --- a/src/test/compile-fail/issue-2587-2.rs +++ /dev/null @@ -1,26 +0,0 @@ -#[legacy_modes]; - -fn foo(+_t: T) { fail; } - -fn bar(+_t: T) { fail; } - -struct S { - x: int, -} - -impl S : Drop { - fn finalize(&self) {} -} - -fn S(x: int) -> S { S { x: x } } - -impl S : Add { - pure fn add(rhs: &S) -> S { - S { x: self.x + (*rhs).x } - } -} - -fn main() { - let v = S(5); - let _y = v + (move v); //~ ERROR: copying a noncopyable value -} diff --git a/src/test/compile-fail/issue-2590.rs b/src/test/compile-fail/issue-2590.rs index 0f4a4804c751..a1837c6bb8b4 100644 --- a/src/test/compile-fail/issue-2590.rs +++ b/src/test/compile-fail/issue-2590.rs @@ -10,7 +10,7 @@ trait parse { impl parser: parse { fn parse() -> ~[int] { - dvec::unwrap(move self.tokens) //~ ERROR moving out of immutable field + dvec::unwrap(self.tokens) //~ ERROR moving out of immutable field } }