Skip to content

Commit 441044f

Browse files
huonwnikomatsakis
authored andcommitted
Update compile-fail tests to use is/us, not i/u.
1 parent 85f961e commit 441044f

File tree

194 files changed

+379
-379
lines changed

Some content is hidden

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

194 files changed

+379
-379
lines changed

src/test/compile-fail/array-old-syntax-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
// Test that the old fixed length array syntax is a parsing error.
1212

1313
fn main() {
14-
let _x: [isize, ..3] = [0i, 1, 2]; //~ ERROR
14+
let _x: [isize, ..3] = [0is, 1, 2]; //~ ERROR
1515
}

src/test/compile-fail/array-old-syntax-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
// Test that the old repeating array syntax gives an error.
1212

1313
fn main() {
14-
let _ = [0i, ..3]; //~ ERROR
14+
let _ = [0is, ..3]; //~ ERROR
1515
}

src/test/compile-fail/asm-in-bad-modifier.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pub fn main() {
2020
let x: isize;
2121
let y: isize;
2222
unsafe {
23-
asm!("mov $1, $0" : "=r"(x) : "=r"(5u)); //~ ERROR input operand constraint contains '='
24-
asm!("mov $1, $0" : "=r"(y) : "+r"(5u)); //~ ERROR input operand constraint contains '+'
23+
asm!("mov $1, $0" : "=r"(x) : "=r"(5us)); //~ ERROR input operand constraint contains '='
24+
asm!("mov $1, $0" : "=r"(y) : "+r"(5us)); //~ ERROR input operand constraint contains '+'
2525
}
2626
foo(x);
2727
foo(y);

src/test/compile-fail/asm-misplaced-option.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ pub fn main() {
2121
let mut x: isize = 0;
2222
unsafe {
2323
// extra colon
24-
asm!("mov $1, $0" : "=r"(x) : "r"(5u), "0"(x) : : "cc");
24+
asm!("mov $1, $0" : "=r"(x) : "r"(5us), "0"(x) : : "cc");
2525
//~^ WARNING unrecognized option
2626
}
2727
assert_eq!(x, 5);
2828

2929
unsafe {
3030
// comma in place of a colon
31-
asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8u) : "cc", "volatile");
31+
asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8us) : "cc", "volatile");
3232
//~^ WARNING expected a clobber, found an option
3333
}
3434
assert_eq!(x, 13);

src/test/compile-fail/asm-out-assign-imm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn main() {
2121
x = 1; //~ NOTE prior assignment occurs here
2222
foo(x);
2323
unsafe {
24-
asm!("mov $1, $0" : "=r"(x) : "r"(5u)); //~ ERROR re-assignment of immutable variable `x`
24+
asm!("mov $1, $0" : "=r"(x) : "r"(5us)); //~ ERROR re-assignment of immutable variable `x`
2525
}
2626
foo(x);
2727
}

src/test/compile-fail/asm-out-no-modifier.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn foo(x: isize) { println!("{}", x); }
1919
pub fn main() {
2020
let x: isize;
2121
unsafe {
22-
asm!("mov $1, $0" : "r"(x) : "r"(5u)); //~ ERROR output operand constraint lacks '='
22+
asm!("mov $1, $0" : "r"(x) : "r"(5us)); //~ ERROR output operand constraint lacks '='
2323
}
2424
foo(x);
2525
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct cat {
1515
}
1616

1717
impl cat {
18-
pub fn speak(&self) { self.meows += 1u; }
18+
pub fn speak(&self) { self.meows += 1us; }
1919
}
2020

2121
fn cat(in_x : usize, in_y : isize) -> cat {
@@ -26,6 +26,6 @@ fn cat(in_x : usize, in_y : isize) -> cat {
2626
}
2727

2828
fn main() {
29-
let nyan : cat = cat(52u, 99);
29+
let nyan : cat = cat(52us, 99);
3030
nyan.speak = |&:| println!("meow"); //~ ERROR attempted to take value of method
3131
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn baz(x: &Foo<A=Bar>) {
4040

4141

4242
pub fn main() {
43-
let a = 42i;
43+
let a = 42is;
4444
foo1(a); //~ERROR expected usize, found struct Bar
4545
baz(&a); //~ERROR expected usize, found struct Bar
4646
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ impl Foo for isize {
2828
}
2929

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

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

36-
let c = &42i as &Foo<B=char>;
36+
let c = &42is as &Foo<B=char>;
3737
//~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified
3838

39-
let d = &42i as &Foo;
39+
let d = &42is as &Foo;
4040
//~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified
4141
//~| ERROR the value of the associated type `B` (from the trait `Foo`) must be specified
4242
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Tests that a function with a ! annotation always actually fails
1212

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

17-
fn main() { bad_bang(5u); }
17+
fn main() { bad_bang(5us); }

0 commit comments

Comments
 (0)