Skip to content

Commit 7048e05

Browse files
committed
auto merge of #8932 : huonw/rust/closed-issues, r=thestinger
2 parents d252d81 + 490c0c7 commit 7048e05

35 files changed

+196
-108
lines changed

src/test/compile-fail/arc-cant-nest-rw-arc-3177.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-test
12-
// error-pattern: instantiating a type parameter with an incompatible type
1311
extern mod extra;
14-
use extra::arc::rw_arc;
12+
use extra::arc::RWArc;
1513

1614
fn main() {
17-
let arc1 = ~rw_arc(true);
18-
let _arc2 = ~rw_arc(arc1);
15+
let arc1 = RWArc::new(true);
16+
let _arc2 = RWArc::new(arc1); //~ ERROR instantiating a type parameter with an incompatible type
1917
}

src/test/compile-fail/bind-by-move-no-lvalues-2.rs

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

src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// xfail-test #3024
21
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
32
// file at the top-level directory of this distribution and at
43
// http://rust-lang.org/COPYRIGHT.
@@ -20,7 +19,7 @@ impl Drop for X {
2019
}
2120

2221
fn unwrap(x: X) -> ~str {
23-
let X { x: y } = x; //~ ERROR cannot bind by-move within struct
22+
let X { x: y } = x; //~ ERROR cannot move out of type
2423
y
2524
}
2625

src/test/compile-fail/bind-by-move-no-lvalues-1.rs renamed to src/test/compile-fail/functional-struct-update-noncopyable.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-test
11+
// issue 7327
1212

13-
struct X { x: (), }
13+
// xfail-fast #7103
14+
extern mod extra;
15+
use extra::arc::*;
1416

15-
impl Drop for X {
16-
fn drop(&self) {
17-
error!("destructor runs");
18-
}
19-
}
17+
struct A { y: Arc<int>, x: Arc<int> }
2018

19+
impl Drop for A {
20+
fn drop(&self) { println(fmt!("x=%?", self.x.get())); }
21+
}
2122
fn main() {
22-
let x = Some(X { x: () });
23-
match x {
24-
Some(_z) => { }, //~ ERROR cannot bind by-move when matching an lvalue
25-
None => fail!()
26-
}
23+
let a = A { y: Arc::new(1), x: Arc::new(2) };
24+
let _b = A { y: Arc::new(3), ..a };
25+
let _c = a; //~ ERROR use of moved value
2726
}

src/test/compile-fail/issue-2951.rs

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

11-
// xfail-test
1211
fn foo<T, U>(x: T, y: U) {
1312
let mut xx = x;
14-
xx = y; // error message should mention T and U, not 'a and 'b
13+
xx = y; //~ ERROR expected `T` but found `U`
1514
}
1615

1716
fn main() {

src/test/compile-fail/issue-3080.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-test
1211
struct x(());
1312
impl x {
14-
pub unsafe fn with() { } // This should fail
13+
pub unsafe fn with(&self) { }
1514
}
1615

1716
fn main() {
18-
x(()).with();
17+
x(()).with(); //~ ERROR requires unsafe function or block
1918
}

src/test/compile-fail/issue-3973.rs

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

1111
// xfail-test
12+
use std::io;
13+
1214
struct Point {
1315
x: float,
1416
y: float,

src/test/compile-fail/issue-5062.rs

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

11-
// xfail-test
12-
fn main() { fmt!("%?", None); } //~ ERROR can't resolve type variable
11+
fn main() { fmt!("%?", None); } //~ ERROR unconstrained type

src/test/compile-fail/issue-6977.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
//xfail-test
2-
31
// Trying to create a fixed-length vector with a negative size
42

53
fn main() {
6-
let _x = [0,..-1];
4+
let _x = [0,..-1]; //~ ERROR found negative integer
75
}

src/test/compile-fail/view-items-at-top.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern mod extra;
1515
fn f() {
1616
}
1717

18-
use extra::net; //~ ERROR view items must be declared at the top
18+
use extra::net; //~ ERROR `use` and `extern mod` declarations must precede items
1919

2020
fn main() {
2121
}

0 commit comments

Comments
 (0)