Skip to content

Commit 85f961e

Browse files
huonwnikomatsakis
authored andcommitted
Update compile fail tests to use usize.
1 parent 0c70ce1 commit 85f961e

File tree

162 files changed

+325
-325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+325
-325
lines changed

src/test/compile-fail/assign-to-method.rs

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

1111
struct cat {
12-
meows : uint,
12+
meows : usize,
1313

1414
how_hungry : isize,
1515
}
@@ -18,7 +18,7 @@ impl cat {
1818
pub fn speak(&self) { self.meows += 1u; }
1919
}
2020

21-
fn cat(in_x : uint, in_y : isize) -> cat {
21+
fn cat(in_x : usize, in_y : isize) -> cat {
2222
cat {
2323
meows: in_x,
2424
how_hungry: in_y

src/test/compile-fail/associated-types-eq-2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pub trait Foo {
1919
struct Bar;
2020

2121
impl Foo for isize {
22-
type A = uint;
23-
fn boo(&self) -> uint { 42 }
22+
type A = usize;
23+
fn boo(&self) -> usize { 42 }
2424
}
2525

2626
fn baz<I: Foo>(x: &<I as Foo<A=Bar>>::A) {}

src/test/compile-fail/associated-types-eq-3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pub trait Foo {
1919
struct Bar;
2020

2121
impl Foo for isize {
22-
type A = uint;
23-
fn boo(&self) -> uint {
22+
type A = usize;
23+
fn boo(&self) -> usize {
2424
42
2525
}
2626
}

src/test/compile-fail/associated-types-eq-expr-path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ trait Foo {
1616
}
1717

1818
impl Foo for isize {
19-
type A = uint;
19+
type A = usize;
2020
fn bar() -> isize { 42 }
2121
}
2222

2323
pub fn main() {
24-
let x: isize = Foo::<A=uint>::bar();
24+
let x: isize = Foo::<A=usize>::bar();
2525
//~^ERROR unexpected binding of associated item in expression path
2626
}

src/test/compile-fail/associated-types-eq-hr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ struct UintStruct {
3333
}
3434

3535
impl<'a> TheTrait<&'a isize> for UintStruct {
36-
type A = &'a uint;
36+
type A = &'a usize;
3737

38-
fn get(&self, t: &'a isize) -> &'a uint {
38+
fn get(&self, t: &'a isize) -> &'a usize {
3939
panic!()
4040
}
4141
}
@@ -47,7 +47,7 @@ fn foo<T>()
4747
}
4848

4949
fn bar<T>()
50-
where T : for<'x> TheTrait<&'x isize, A = &'x uint>
50+
where T : for<'x> TheTrait<&'x isize, A = &'x usize>
5151
{
5252
// ok for UintStruct, but not IntStruct
5353
}

src/test/compile-fail/associated-types-incomplete-object.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ pub trait Foo {
2020
struct Bar;
2121

2222
impl Foo for isize {
23-
type A = uint;
23+
type A = usize;
2424
type B = char;
25-
fn boo(&self) -> uint {
25+
fn boo(&self) -> usize {
2626
42
2727
}
2828
}
2929

3030
pub fn main() {
31-
let a = &42i as &Foo<A=uint, B=char>;
31+
let a = &42i as &Foo<A=usize, B=char>;
3232

33-
let b = &42i as &Foo<A=uint>;
33+
let b = &42i as &Foo<A=usize>;
3434
//~^ ERROR the value of the associated type `B` (from the trait `Foo`) must be specified
3535

3636
let c = &42i as &Foo<B=char>;

src/test/compile-fail/associated-types-path-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub trait Foo {
1515
}
1616

1717
impl Foo for isize {
18-
type A = uint;
18+
type A = usize;
1919
}
2020

2121
pub fn f1<T: Foo>(a: T, x: T::A) {}

src/test/compile-fail/associated-types-unconstrained.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trait Foo {
1616
}
1717

1818
impl Foo for isize {
19-
type A = uint;
19+
type A = usize;
2020
fn bar() -> isize { 42 }
2121
}
2222

src/test/compile-fail/bad-bang-ann-3.rs

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

1111
// Tests that a function with a ! annotation always actually fails
1212

13-
fn bad_bang(i: uint) -> ! {
13+
fn bad_bang(i: usize) -> ! {
1414
return 7u; //~ ERROR `return` in a function declared as diverging [E0166]
1515
}
1616

src/test/compile-fail/bad-bang-ann.rs

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

1111
// Tests that a function with a ! annotation always actually fails
1212

13-
fn bad_bang(i: uint) -> ! { //~ ERROR computation may converge in a function marked as diverging
13+
fn bad_bang(i: usize) -> ! { //~ ERROR computation may converge in a function marked as diverging
1414
if i < 0u { } else { panic!(); }
1515
}
1616

0 commit comments

Comments
 (0)