Skip to content

Commit bcc5c56

Browse files
committed
---
yaml --- r: 147954 b: refs/heads/try2 c: df13c64 h: refs/heads/master v: v3
1 parent 369ae66 commit bcc5c56

File tree

8 files changed

+4
-46
lines changed

8 files changed

+4
-46
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 65d55afd2f94cb6cd8d66e767a52bc99a1569341
8+
refs/heads/try2: df13c64c3b221f0408fa7e149884e25ff5b02343
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,5 @@ fn b() {
4949
q.x += 1; // and OK to mutate it
5050
}
5151

52-
fn c() {
53-
// Here the receiver is in aliased memory but due to write
54-
// barriers we can still consider it immutable.
55-
let q = @mut Point {x: 3, y: 4};
56-
*q + 3;
57-
q.times(3);
58-
}
59-
6052
fn main() {
6153
}

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,5 @@ fn b() {
4848
l.x += 1;
4949
}
5050

51-
fn c() {
52-
// Loaning @mut as & is considered legal due to dynamic checks...
53-
let q = @mut point {x: 3, y: 4};
54-
q.impurem();
55-
56-
// ...but we still detect errors statically when we can.
57-
q.blockm(|| {
58-
q.x = 10; //~ ERROR cannot assign
59-
})
60-
}
61-
6251
fn main() {
6352
}

branches/try2/src/test/compile-fail/borrowck-mut-boxed-vec.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

branches/try2/src/test/compile-fail/borrowck-mut-deref-comp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
struct foo(~int);
1414

15-
fn borrow(x: @mut foo) {
15+
fn borrow(x: @foo) {
1616
let _y = &***x;
1717
*x = foo(~4); //~ ERROR cannot assign
1818
}

branches/try2/src/test/compile-fail/borrowck-object-mutability.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ fn managed_receiver(x: @Foo) {
3030
x.borrowed_mut(); //~ ERROR cannot borrow
3131
}
3232

33-
fn managed_mut_receiver(x: @mut Foo) {
34-
x.borrowed();
35-
x.borrowed_mut();
36-
}
37-
3833
fn owned_receiver(x: ~Foo) {
3934
x.borrowed();
4035
x.borrowed_mut(); //~ ERROR cannot borrow

branches/try2/src/test/run-pass/borrowck-root-while-cond-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ struct F { f: @G }
1414
struct G { g: ~[int] }
1515

1616
pub fn main() {
17-
let rec = @mut F {f: @G {g: ~[1, 2, 3]}};
17+
let rec = @F {f: @G {g: ~[1, 2, 3]}};
1818
while rec.f.g.len() == 23 {}
1919
}

branches/try2/src/test/run-pass/borrowck-root-while-cond.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ fn borrow<'r,T>(x: &'r T) -> &'r T {x}
1515
struct Rec { f: @int }
1616

1717
pub fn main() {
18-
let rec = @mut Rec {f: @22};
18+
let rec = @Rec {f: @22};
1919
while *borrow(rec.f) == 23 {}
2020
}

0 commit comments

Comments
 (0)