提交 440f8dfc 编写于 作者: N Niko Matsakis

Correct tests

rs=breakage
上级 532c94d0
......@@ -1839,7 +1839,7 @@ fn report_illegal_move(move_span: span,
self.report_illegal_read(move_span, lnk, var, MovedValue);
self.tcx.sess.span_note(
move_span, ~"move of variable occurred here");
move_span, ~"move of value occurred here");
}
......
......@@ -47,16 +47,11 @@ fn b() {
}
fn c() {
// Here the receiver is in aliased memory and hence we cannot
// consider it immutable:
// Here the receiver is in aliased memory but due to write
// barriers we can still consider it immutable.
let q = @mut Point {x: 3, y: 4};
// ...this is ok for pure fns
*q + 3;
// ...and impure fns
(*q).times(3);
q.times(3);
}
fn main() {
......
......@@ -55,15 +55,10 @@ fn b() {
}
fn c() {
// Here the receiver is in aliased memory and hence we cannot
// consider it immutable:
// Loaning @mut as & is considered legal due to dynamic checks:
let q = @mut {x: 3, y: 4};
// ...this is ok for pure fns
(*q).purem();
// ...and impure fns
(*q).impurem();
q.purem();
q.impurem();
}
fn main() {
......
......@@ -15,6 +15,6 @@ fn main() {
let x: int = 25;
loop {
take(move x); //~ ERROR use of moved value: `x`
//~^ NOTE move of variable occurred here
//~^ NOTE move of value occurred here
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册