Skip to content

Commit 364beaa

Browse files
committed
Un-xfail/move/delete some tests.
1 parent 6a3dd30 commit 364beaa

30 files changed

+36
-122
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-1.rs

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

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/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
}

src/test/run-pass/autoderef-method-priority.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// xfail-test #5321
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.

src/test/run-pass/deriving-cmp-generic-struct-enum.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// xfail-test #5530
2-
31
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
42
// file at the top-level directory of this distribution and at
53
// http://rust-lang.org/COPYRIGHT.
@@ -18,18 +16,18 @@ enum ES<T> {
1816

1917

2018
pub fn main() {
21-
let es11 = ES1 {x: 1}, es12 = ES1 {x: 2}, es21 = ES2 {x: 1, y: 1}, es22 = ES2 {x: 1, y: 2};
19+
let (es11, es12, es21, es22) = (ES1 {x: 1}, ES1 {x: 2}, ES2 {x: 1, y: 1}, ES2 {x: 1, y: 2});
2220

2321
// in order for both Ord and TotalOrd
2422
let ess = [es11, es12, es21, es22];
2523

26-
for ess.eachi |i, es1| {
27-
for ess.eachi |j, es2| {
24+
for (i, es1) in ess.iter().enumerate() {
25+
for (j, es2) in ess.iter().enumerate() {
2826
let ord = i.cmp(&j);
2927

3028
let eq = i == j;
31-
let lt = i < j, le = i <= j;
32-
let gt = i > j, ge = i >= j;
29+
let (lt, le) = (i < j, i <= j);
30+
let (gt, ge) = (i > j, i >= j);
3331

3432
// Eq
3533
assert_eq!(*es1 == *es2, eq);
@@ -49,4 +47,4 @@ pub fn main() {
4947
assert_eq!(es1.cmp(es2), ord);
5048
}
5149
}
52-
}
50+
}

src/test/run-pass/estr-shared.rs

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

11-
// xfail-test
1211
pub fn main() {
13-
let x : @str = @"hello";
12+
let _x : @str = @"hello";
1413
}

src/test/run-pass/extern-pass-TwoU16s.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// Test a foreign function that accepts and returns a struct
1212
// by value.
1313

14-
// xfail-test #5744
15-
1614
#[deriving(Eq)]
1715
struct TwoU16s {
1816
one: u16, two: u16
@@ -22,6 +20,7 @@ extern {
2220
pub fn rust_dbg_extern_identity_TwoU16s(v: TwoU16s) -> TwoU16s;
2321
}
2422

23+
#[fixed_stack_segment] #[inline(never)]
2524
pub fn main() {
2625
unsafe {
2726
let x = TwoU16s {one: 22, two: 23};

src/test/run-pass/extern-pass-TwoU8s.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// Test a foreign function that accepts and returns a struct
1212
// by value.
1313

14-
// xfail-test #5744
15-
1614
#[deriving(Eq)]
1715
struct TwoU8s {
1816
one: u8, two: u8
@@ -22,6 +20,7 @@ extern {
2220
pub fn rust_dbg_extern_identity_TwoU8s(v: TwoU8s) -> TwoU8s;
2321
}
2422

23+
#[fixed_stack_segment] #[inline(never)]
2524
pub fn main() {
2625
unsafe {
2726
let x = TwoU8s {one: 22, two: 23};

src/test/run-pass/issue-1516.rs

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

11-
// xfail-test
12-
pub fn main() { let early_error: @fn(str) -> ! = {|msg| fail!() }; }
11+
pub fn main() {
12+
let early_error: @fn(&str) -> ! = |_msg| { fail!() };
13+
}

src/test/run-pass/issue-3874.rs

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

11-
// xfail-test FIXME #3874
1211
enum PureCounter { PureCounter(uint) }
1312

14-
fn each(self: PureCounter, blk: &fn(v: &uint)) {
15-
let PureCounter(ref x) = self;
13+
fn each(thing: PureCounter, blk: &fn(v: &uint)) {
14+
let PureCounter(ref x) = thing;
1615
blk(x);
1716
}
1817

src/test/run-pass/issue-3895.rs

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

11-
// xfail-test
1211
pub fn main() {
1312
enum State { BadChar, BadSyntax }
1413

src/test/compile-fail/issue-3991.rs renamed to src/test/run-pass/issue-3991.rs

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

11-
// xfail-test
1211
struct HasNested {
13-
mut nest: ~[~[int]],
12+
nest: ~[~[int]],
1413
}
1514

1615
impl HasNested {
17-
fn method_push_local(&self) {
16+
fn method_push_local(&mut self) {
1817
self.nest[0].push(0);
1918
}
2019
}

src/test/run-pass/issue-5280.rs

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

11-
// xfail-test
12-
1311
type FontTableTag = u32;
1412

1513
trait FontTableTagConversions {

src/test/run-pass/issue-5315.rs

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

11-
// xfail-test
1211
struct A(bool);
1312

1413
fn main() {

src/test/run-pass/issue-6128.rs

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

11-
// xfail-test
12-
1311
use std::hashmap::HashMap;
1412

1513
trait Graph<Node, Edge> {

src/test/run-pass/issue-6344-let.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// xfail-test #3874
21
// Copyright 2013 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.

src/test/run-pass/issue-6898.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// xfail-test
2-
31
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
42
// file at the top-level directory of this distribution and at
53
// http://rust-lang.org/COPYRIGHT.
@@ -14,7 +12,7 @@ use std::unstable::intrinsics;
1412

1513
/// Returns the size of a type
1614
pub fn size_of<T>() -> uint {
17-
TypeInfo::size_of::<T>()
15+
TypeInfo::size_of(None::<T>)
1816
}
1917

2018
/// Returns the size of the type that `val` points to
@@ -23,19 +21,19 @@ pub fn size_of_val<T>(val: &T) -> uint {
2321
}
2422

2523
pub trait TypeInfo {
26-
fn size_of() -> uint;
24+
fn size_of(_lame_type_hint: Option<Self>) -> uint;
2725
fn size_of_val(&self) -> uint;
2826
}
2927

3028
impl<T> TypeInfo for T {
3129
/// The size of the type in bytes.
32-
fn size_of() -> uint {
30+
fn size_of(_lame_type_hint: Option<T>) -> uint {
3331
unsafe { intrinsics::size_of::<T>() }
3432
}
3533

3634
/// Returns the size of the type of `self` in bytes.
3735
fn size_of_val(&self) -> uint {
38-
TypeInfo::size_of::<T>()
36+
TypeInfo::size_of(None::<T>)
3937
}
4038
}
4139

src/test/run-pass/regions-borrow-evec-fixed.rs

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

11-
// xfail-test
12-
1311
fn foo(x: &[int]) -> int {
1412
x[0]
1513
}

src/test/run-pass/tag-align-dyn-u64.rs

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

11-
// xfail-test
11+
// xfail-test #7340 fails on 32-bit linux
12+
use std::ptr;
1213

1314
enum a_tag<A> {
1415
a_tag(A)

src/test/run-pass/tag-align-dyn-variants.rs

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

11-
// xfail-test
12-
11+
// xfail-test #7340 fails on 32-bit linux
1312
use std::ptr;
1413

1514
enum a_tag<A,B> {

src/test/run-pass/tag-align-u64.rs

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

11-
// xfail-test
12-
11+
// xfail-test #7340 fails on 32-bit linux
1312
use std::ptr;
1413

1514
enum a_tag {

src/test/run-pass/trait-cast.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// xfail-test FIXME #5882
2-
// Weird borrow check bug
3-
41
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
52
// file at the top-level directory of this distribution and at
63
// http://rust-lang.org/COPYRIGHT.

0 commit comments

Comments
 (0)