Skip to content

Commit 853d741

Browse files
committed
---
yaml --- r: 138527 b: refs/heads/try2 c: 8fceee6 h: refs/heads/master i: 138525: dd1c8b2 138523: b3dabdc 138519: 269661f 138511: 8c43b48 138495: c8ead27 v: v3
1 parent 9552644 commit 853d741

19 files changed

+26
-257
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: 96bdc349303c1bd55ebba4e2dd5f7f51e087dad2
8+
refs/heads/try2: 8fceee6c88ee58a506b9d2d9f5f04c1dc423214c
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/assign-super.rs

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

branches/try2/src/test/compile-fail/borrowck-assign-comp-idx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
type point = { x: int, y: int };
1212

1313
fn a() {
14-
let mut p = ~[mut 1];
14+
let mut p = ~[1];
1515

1616
// Create an immutable pointer into p's contents:
1717
let _q: &int = &p[0]; //~ NOTE loan of mutable vec content granted here
@@ -25,7 +25,7 @@ fn b() {
2525
// here we alias the mutable vector into an imm slice and try to
2626
// modify the original:
2727

28-
let mut p = ~[mut 1];
28+
let mut p = ~[1];
2929

3030
do borrow(p) { //~ NOTE loan of mutable vec content granted here
3131
p[0] = 5; //~ ERROR assigning to mutable vec content prohibited due to outstanding loan
@@ -35,7 +35,7 @@ fn b() {
3535
fn c() {
3636
// Legal because the scope of the borrow does not include the
3737
// modification:
38-
let mut p = ~[mut 1];
38+
let mut p = ~[1];
3939
borrow(p, ||{});
4040
p[0] = 5;
4141
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ fn takes_imm_elt(_v: &int, f: fn()) {
1717
}
1818

1919
fn has_mut_vec_and_does_not_try_to_change_it() {
20-
let v = ~[mut 1, 2, 3];
20+
let mut v = ~[1, 2, 3];
2121
do takes_imm_elt(&v[0]) {
2222
}
2323
}
2424

2525
fn has_mut_vec_but_tries_to_change_it() {
26-
let v = ~[mut 1, 2, 3];
26+
let mut v = ~[1, 2, 3];
2727
do takes_imm_elt(&v[0]) { //~ NOTE loan of mutable vec content granted here
2828
v[1] = 4; //~ ERROR assigning to mutable vec content prohibited due to outstanding loan
2929
}
@@ -34,7 +34,7 @@ fn takes_const_elt(_v: &const int, f: fn()) {
3434
}
3535

3636
fn has_mut_vec_and_tries_to_change_it() {
37-
let v = ~[mut 1, 2, 3];
37+
let mut v = ~[1, 2, 3];
3838
do takes_const_elt(&const v[0]) {
3939
v[1] = 4;
4040
}

branches/try2/src/test/compile-fail/borrowck-mut-slice-of-imm-vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn write(v: &[mut int]) {
11+
fn write(v: &mut [int]) {
1212
v[0] += 1;
1313
}
1414

branches/try2/src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs

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

branches/try2/src/test/compile-fail/borrowck-vec-pattern-move-tail.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() {
2-
let a = [mut 1, 2, 3, 4];
2+
let mut a = [1, 2, 3, 4];
33
let _ = match a {
44
[1, 2, ..tail] => tail,
55
_ => core::util::unreachable()

branches/try2/src/test/compile-fail/issue-2969.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
fn main()
1313
{
1414
// See #2969 -- error message should be improved
15-
let mut x = [mut 1, 2, 4];
15+
let mut x = [1, 2, 4];
1616
let v : &int = &x[2];
1717
x[2] = 6;
1818
assert *v == 6;

branches/try2/src/test/compile-fail/issue-3243.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// except according to those terms.
1010

1111
// xfail-test
12-
fn function() -> &[mut int] {
13-
let mut x: &static/[mut int] = &[mut 1,2,3];
12+
fn function() -> &mut [int] {
13+
let mut x: &static/mut [int] = &[1,2,3];
1414
x[0] = 12345;
1515
x //~ ERROR bad
1616
}

branches/try2/src/test/compile-fail/lub-in-args.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
fn two_args<T>(x: T, y: T) { }
1212

1313
fn main() {
14-
let x: ~[mut int] = ~[mut 3];
15-
let y: ~[int] = ~[3];
1614
let a: @mut int = @mut 3;
1715
let b: @int = @3;
1816

@@ -22,6 +20,5 @@ fn main() {
2220
// shortcoming of the current inference algorithm. These errors
2321
// are *not* desirable.
2422

25-
two_args(x, y); //~ ERROR (values differ in mutability)
2623
two_args(a, b); //~ ERROR (values differ in mutability)
2724
}

branches/try2/src/test/compile-fail/mutable-huh-variance-box.rs

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

branches/try2/src/test/compile-fail/mutable-huh-variance-deep.rs

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

branches/try2/src/test/compile-fail/mutable-huh-variance-ptr.rs

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

branches/try2/src/test/compile-fail/mutable-huh-variance-vec1.rs

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

branches/try2/src/test/compile-fail/mutable-huh-variance-vec2.rs

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

branches/try2/src/test/compile-fail/mutable-huh-variance-vec3.rs

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

branches/try2/src/test/compile-fail/mutable-huh-variance-vec4.rs

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

branches/try2/src/test/compile-fail/regions-infer-invariance-due-to-mutability-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct invariant {
12-
f: @[mut &int]
12+
f: @mut [&int]
1313
}
1414

1515
fn to_same_lifetime(bi: invariant/&r) {

0 commit comments

Comments
 (0)