Skip to content

Commit 80fbeec

Browse files
committed
---
yaml --- r: 42477 b: refs/heads/try c: 440f8df h: refs/heads/master i: 42475: 3004f0e v: v3
1 parent 0a3ecc3 commit 80fbeec

File tree

5 files changed

+9
-19
lines changed

5 files changed

+9
-19
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: 532c94d0f12cb2c56870c283947aa12ce2c9b9b6
5+
refs/heads/try: 440f8dfc4e72575e1b5f38b3ebc3d0576e7b8e15
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/middle/liveness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ impl @Liveness {
18391839

18401840
self.report_illegal_read(move_span, lnk, var, MovedValue);
18411841
self.tcx.sess.span_note(
1842-
move_span, ~"move of variable occurred here");
1842+
move_span, ~"move of value occurred here");
18431843

18441844
}
18451845

branches/try/src/test/compile-fail/borrowck-loan-rcvr-overloaded-op.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,11 @@ fn b() {
4747
}
4848

4949
fn c() {
50-
// Here the receiver is in aliased memory and hence we cannot
51-
// consider it immutable:
50+
// Here the receiver is in aliased memory but due to write
51+
// barriers we can still consider it immutable.
5252
let q = @mut Point {x: 3, y: 4};
53-
54-
// ...this is ok for pure fns
5553
*q + 3;
56-
57-
58-
// ...and impure fns
59-
(*q).times(3);
54+
q.times(3);
6055
}
6156

6257
fn main() {

branches/try/src/test/compile-fail/borrowck-loan-rcvr.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,10 @@ fn b() {
5555
}
5656

5757
fn c() {
58-
// Here the receiver is in aliased memory and hence we cannot
59-
// consider it immutable:
58+
// Loaning @mut as & is considered legal due to dynamic checks:
6059
let q = @mut {x: 3, y: 4};
61-
62-
// ...this is ok for pure fns
63-
(*q).purem();
64-
65-
// ...and impure fns
66-
(*q).impurem();
60+
q.purem();
61+
q.impurem();
6762
}
6863

6964
fn main() {

branches/try/src/test/compile-fail/liveness-move-from-mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ fn main() {
1515
let x: int = 25;
1616
loop {
1717
take(move x); //~ ERROR use of moved value: `x`
18-
//~^ NOTE move of variable occurred here
18+
//~^ NOTE move of value occurred here
1919
}
2020
}

0 commit comments

Comments
 (0)