Skip to content

Commit 72eb214

Browse files
committed
Update suffixes en masse in tests using perl -p -i -e
1 parent 8c34b26 commit 72eb214

File tree

266 files changed

+639
-639
lines changed

Some content is hidden

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

266 files changed

+639
-639
lines changed

src/test/auxiliary/cci_class_3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub mod kitties {
1616
}
1717

1818
impl cat {
19-
pub fn speak(&mut self) { self.meows += 1u; }
19+
pub fn speak(&mut self) { self.meows += 1_usize; }
2020
pub fn meow_count(&mut self) -> uint { self.meows }
2121
}
2222

src/test/auxiliary/cci_class_4.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ pub mod kitties {
3434
impl cat {
3535
pub fn meow(&mut self) {
3636
println!("Meow");
37-
self.meows += 1u;
38-
if self.meows % 5u == 0u {
37+
self.meows += 1_usize;
38+
if self.meows % 5_usize == 0_usize {
3939
self.how_hungry += 1;
4040
}
4141
}

src/test/auxiliary/cci_class_cast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ pub mod kitty {
2626
impl cat {
2727
fn meow(&mut self) {
2828
println!("Meow");
29-
self.meows += 1u;
30-
if self.meows % 5u == 0u {
29+
self.meows += 1_usize;
30+
if self.meows % 5_usize == 0_usize {
3131
self.how_hungry += 1;
3232
}
3333
}

src/test/auxiliary/cci_impl_lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl uint_helpers for uint {
2020
let mut i = *self;
2121
while i < v {
2222
f(i);
23-
i += 1u;
23+
i += 1_usize;
2424
}
2525
}
2626
}

src/test/auxiliary/cci_iter_lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
#[inline]
1414
pub fn iter<T, F>(v: &[T], mut f: F) where F: FnMut(&T) {
15-
let mut i = 0u;
15+
let mut i = 0_usize;
1616
let n = v.len();
1717
while i < n {
1818
f(&v[i]);
19-
i += 1u;
19+
i += 1_usize;
2020
}
2121
}

src/test/auxiliary/cci_no_inline_lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
// same as cci_iter_lib, more-or-less, but not marked inline
1515
pub fn iter<F>(v: Vec<uint> , mut f: F) where F: FnMut(uint) {
16-
let mut i = 0u;
16+
let mut i = 0_usize;
1717
let n = v.len();
1818
while i < n {
1919
f(v[i]);
20-
i += 1u;
20+
i += 1_usize;
2121
}
2222
}

src/test/auxiliary/macro_reexport_1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
#![crate_type = "dylib"]
1212
#[macro_export]
1313
macro_rules! reexported {
14-
() => ( 3u )
14+
() => ( 3_usize )
1515
}

src/test/auxiliary/roman_numerals.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
4747
};
4848

4949
let mut text = &*text;
50-
let mut total = 0u;
50+
let mut total = 0_usize;
5151
while !text.is_empty() {
5252
match NUMERALS.iter().find(|&&(rn, _)| text.starts_with(rn)) {
5353
Some(&(rn, val)) => {

src/test/auxiliary/unboxed-closures-cross-crate.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ use std::ops::Add;
1414

1515
#[inline]
1616
pub fn has_closures() -> uint {
17-
let x = 1u;
17+
let x = 1_usize;
1818
let mut f = move || x;
19-
let y = 1u;
19+
let y = 1_usize;
2020
let g = || y;
2121
f() + g()
2222
}

src/test/bench/noise.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ fn main() {
104104
let mut pixels = [0f32; 256*256];
105105
let n2d = Noise2DContext::new();
106106

107-
for _ in 0u..100 {
108-
for y in 0u..256 {
109-
for x in 0u..256 {
107+
for _ in 0..100 {
108+
for y in 0..256 {
109+
for x in 0..256 {
110110
let v = n2d.get(x as f32 * 0.1, y as f32 * 0.1);
111111
pixels[y*256+x] = v * 0.5 + 0.5;
112112
}

src/test/compile-fail-fulldeps/issue-18986.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ pub use use_from_trait_xc::Trait;
1515

1616
fn main() {
1717
match () {
18-
Trait { x: 42us } => () //~ ERROR use of trait `Trait` in a struct pattern
18+
Trait { x: 42_usize } => () //~ ERROR use of trait `Trait` in a struct pattern
1919
}
2020
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn main() {
2828

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

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

+2-2
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 += 1us; }
18+
pub fn speak(&self) { self.meows += 1_usize; }
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(52us, 99);
29+
let nyan : cat = cat(52_usize, 99);
3030
nyan.speak = || println!("meow"); //~ ERROR attempted to take value of method
3131
}

src/test/compile-fail/attr-before-let.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
fn main() {
1212
#[attr] //~ ERROR expected item
13-
let _i = 0;
13+
let __isize = 0;
1414
}

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

+1-1
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 7us; //~ ERROR `return` in a function declared as diverging [E0166]
14+
return 7_usize; //~ ERROR `return` in a function declared as diverging [E0166]
1515
}
1616

1717
fn main() { bad_bang(5); }

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

+1-1
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) -> ! { //~ ERROR computation may converge in a function marked as diverging
14-
if i < 0us { } else { panic!(); }
14+
if i < 0_usize { } else { panic!(); }
1515
}
1616

1717
fn main() { bad_bang(5); }

src/test/compile-fail/bad-method-typaram-kind.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
fn foo<T:'static>() {
12-
1us.bar::<T>(); //~ ERROR `core::marker::Send` is not implemented
12+
1_usize.bar::<T>(); //~ ERROR `core::marker::Send` is not implemented
1313
}
1414

1515
trait bar {

src/test/compile-fail/borrow-immutable-upvar-mutation.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ fn to_fn_mut<A,F:FnMut<A>>(f: F) -> F { f }
2121
fn main() {
2222
// By-ref captures
2323
{
24-
let mut x = 0us;
24+
let mut x = 0_usize;
2525
let _f = to_fn(|| x = 42); //~ ERROR cannot assign
2626

27-
let mut y = 0us;
27+
let mut y = 0_usize;
2828
let _g = to_fn(|| set(&mut y)); //~ ERROR cannot borrow
2929

30-
let mut z = 0us;
30+
let mut z = 0_usize;
3131
let _h = to_fn_mut(|| { set(&mut z); to_fn(|| z = 42); }); //~ ERROR cannot assign
3232
}
3333

3434
// By-value captures
3535
{
36-
let mut x = 0us;
36+
let mut x = 0_usize;
3737
let _f = to_fn(move || x = 42); //~ ERROR cannot assign
3838

39-
let mut y = 0us;
39+
let mut y = 0_usize;
4040
let _g = to_fn(move || set(&mut y)); //~ ERROR cannot borrow
4141

42-
let mut z = 0us;
42+
let mut z = 0_usize;
4343
let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); //~ ERROR cannot assign
4444
}
4545
}

src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ impl Point {
5656
}
5757

5858
fn deref_imm_field(x: Own<Point>) {
59-
let _i = &x.y;
59+
let __isize = &x.y;
6060
}
6161

6262
fn deref_mut_field1(x: Own<Point>) {
63-
let _i = &mut x.y; //~ ERROR cannot borrow
63+
let __isize = &mut x.y; //~ ERROR cannot borrow
6464
}
6565

6666
fn deref_mut_field2(mut x: Own<Point>) {
67-
let _i = &mut x.y;
67+
let __isize = &mut x.y;
6868
}
6969

7070
fn deref_extend_field(x: &Own<Point>) -> &isize {
@@ -114,7 +114,7 @@ fn assign_field4<'a>(x: &'a mut Own<Point>) {
114114
// FIXME(eddyb) #12825 This shouldn't attempt to call deref_mut.
115115
/*
116116
fn deref_imm_method(x: Own<Point>) {
117-
let _i = x.get();
117+
let __isize = x.get();
118118
}
119119
*/
120120

src/test/compile-fail/borrowck-borrow-overloaded-auto-deref.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ impl Point {
5050
}
5151

5252
fn deref_imm_field(x: Rc<Point>) {
53-
let _i = &x.y;
53+
let __isize = &x.y;
5454
}
5555

5656
fn deref_mut_field1(x: Rc<Point>) {
57-
let _i = &mut x.y; //~ ERROR cannot borrow
57+
let __isize = &mut x.y; //~ ERROR cannot borrow
5858
}
5959

6060
fn deref_mut_field2(mut x: Rc<Point>) {
61-
let _i = &mut x.y; //~ ERROR cannot borrow
61+
let __isize = &mut x.y; //~ ERROR cannot borrow
6262
}
6363

6464
fn deref_extend_field(x: &Rc<Point>) -> &isize {
@@ -86,7 +86,7 @@ fn assign_field3<'a>(x: &'a mut Rc<Point>) {
8686
}
8787

8888
fn deref_imm_method(x: Rc<Point>) {
89-
let _i = x.get();
89+
let __isize = x.get();
9090
}
9191

9292
fn deref_mut_method1(x: Rc<Point>) {

src/test/compile-fail/borrowck-borrow-overloaded-deref-mut.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ impl<T> DerefMut for Own<T> {
3232
}
3333

3434
fn deref_imm(x: Own<isize>) {
35-
let _i = &*x;
35+
let __isize = &*x;
3636
}
3737

3838
fn deref_mut1(x: Own<isize>) {
39-
let _i = &mut *x; //~ ERROR cannot borrow
39+
let __isize = &mut *x; //~ ERROR cannot borrow
4040
}
4141

4242
fn deref_mut2(mut x: Own<isize>) {
43-
let _i = &mut *x;
43+
let __isize = &mut *x;
4444
}
4545

4646
fn deref_extend<'a>(x: &'a Own<isize>) -> &'a isize {

src/test/compile-fail/borrowck-borrow-overloaded-deref.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ impl<T> Deref for Rc<T> {
2626
}
2727

2828
fn deref_imm(x: Rc<isize>) {
29-
let _i = &*x;
29+
let __isize = &*x;
3030
}
3131

3232
fn deref_mut1(x: Rc<isize>) {
33-
let _i = &mut *x; //~ ERROR cannot borrow
33+
let __isize = &mut *x; //~ ERROR cannot borrow
3434
}
3535

3636
fn deref_mut2(mut x: Rc<isize>) {
37-
let _i = &mut *x; //~ ERROR cannot borrow
37+
let __isize = &mut *x; //~ ERROR cannot borrow
3838
}
3939

4040
fn deref_extend<'a>(x: &'a Rc<isize>) -> &'a isize {

src/test/compile-fail/borrowck-lend-flow-match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn separate_arms() {
2121
// fact no outstanding loan of x!
2222
x = Some(0);
2323
}
24-
Some(ref _i) => {
24+
Some(ref __isize) => {
2525
x = Some(1); //~ ERROR cannot assign
2626
}
2727
}

src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![allow(dead_code)]
1212
fn main() {
1313
// Original borrow ends at end of function
14-
let mut x = 1us;
14+
let mut x = 1_usize;
1515
let y = &mut x;
1616
let z = &x; //~ ERROR cannot borrow
1717
}
@@ -21,7 +21,7 @@ fn foo() {
2121
match true {
2222
true => {
2323
// Original borrow ends at end of match arm
24-
let mut x = 1us;
24+
let mut x = 1_usize;
2525
let y = &x;
2626
let z = &mut x; //~ ERROR cannot borrow
2727
}
@@ -33,7 +33,7 @@ fn foo() {
3333
fn bar() {
3434
// Original borrow ends at end of closure
3535
|| {
36-
let mut x = 1us;
36+
let mut x = 1_usize;
3737
let y = &mut x;
3838
let z = &mut x; //~ ERROR cannot borrow
3939
};

src/test/compile-fail/class-method-missing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ fn cat(in_x : usize) -> cat {
2727
}
2828

2929
fn main() {
30-
let nyan = cat(0us);
30+
let nyan = cat(0_usize);
3131
}

src/test/compile-fail/class-missing-self.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl cat {
1616
fn sleep(&self) { loop{} }
1717
fn meow(&self) {
1818
println!("Meow");
19-
meows += 1us; //~ ERROR unresolved name
19+
meows += 1_usize; //~ ERROR unresolved name
2020
sleep(); //~ ERROR unresolved name
2121
}
2222

src/test/compile-fail/const-block-non-item-statement.rs

+2-2
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-
const A: usize = { 1us; 2 };
11+
const A: usize = { 1_usize; 2 };
1212
//~^ ERROR: blocks in constants are limited to items and tail expressions
1313

1414
const B: usize = { { } 2 };
@@ -19,7 +19,7 @@ macro_rules! foo {
1919
}
2020
const C: usize = { foo!(); 2 };
2121

22-
const D: usize = { let x = 4us; 2 };
22+
const D: usize = { let x = 4_usize; 2 };
2323
//~^ ERROR: blocks in constants are limited to items and tail expressions
2424

2525
pub fn main() {

src/test/compile-fail/deriving-non-type.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ impl S { }
2222
impl T for S { }
2323

2424
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
25-
static s: usize = 0us;
25+
static s: usize = 0_usize;
2626

2727
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
28-
const c: usize = 0us;
28+
const c: usize = 0_usize;
2929

3030
#[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums
3131
mod m { }

0 commit comments

Comments
 (0)