Skip to content

Commit

Permalink
Update suffixes en masse in tests using perl -p -i -e
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Feb 18, 2015
1 parent 8c34b26 commit 72eb214
Show file tree
Hide file tree
Showing 266 changed files with 639 additions and 639 deletions.
2 changes: 1 addition & 1 deletion src/test/auxiliary/cci_class_3.rs
Expand Up @@ -16,7 +16,7 @@ pub mod kitties {
}

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

Expand Down
4 changes: 2 additions & 2 deletions src/test/auxiliary/cci_class_4.rs
Expand Up @@ -34,8 +34,8 @@ pub mod kitties {
impl cat {
pub fn meow(&mut self) {
println!("Meow");
self.meows += 1u;
if self.meows % 5u == 0u {
self.meows += 1_usize;
if self.meows % 5_usize == 0_usize {
self.how_hungry += 1;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/auxiliary/cci_class_cast.rs
Expand Up @@ -26,8 +26,8 @@ pub mod kitty {
impl cat {
fn meow(&mut self) {
println!("Meow");
self.meows += 1u;
if self.meows % 5u == 0u {
self.meows += 1_usize;
if self.meows % 5_usize == 0_usize {
self.how_hungry += 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/cci_impl_lib.rs
Expand Up @@ -20,7 +20,7 @@ impl uint_helpers for uint {
let mut i = *self;
while i < v {
f(i);
i += 1u;
i += 1_usize;
}
}
}
4 changes: 2 additions & 2 deletions src/test/auxiliary/cci_iter_lib.rs
Expand Up @@ -12,10 +12,10 @@

#[inline]
pub fn iter<T, F>(v: &[T], mut f: F) where F: FnMut(&T) {
let mut i = 0u;
let mut i = 0_usize;
let n = v.len();
while i < n {
f(&v[i]);
i += 1u;
i += 1_usize;
}
}
4 changes: 2 additions & 2 deletions src/test/auxiliary/cci_no_inline_lib.rs
Expand Up @@ -13,10 +13,10 @@

// same as cci_iter_lib, more-or-less, but not marked inline
pub fn iter<F>(v: Vec<uint> , mut f: F) where F: FnMut(uint) {
let mut i = 0u;
let mut i = 0_usize;
let n = v.len();
while i < n {
f(v[i]);
i += 1u;
i += 1_usize;
}
}
2 changes: 1 addition & 1 deletion src/test/auxiliary/macro_reexport_1.rs
Expand Up @@ -11,5 +11,5 @@
#![crate_type = "dylib"]
#[macro_export]
macro_rules! reexported {
() => ( 3u )
() => ( 3_usize )
}
2 changes: 1 addition & 1 deletion src/test/auxiliary/roman_numerals.rs
Expand Up @@ -47,7 +47,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
};

let mut text = &*text;
let mut total = 0u;
let mut total = 0_usize;
while !text.is_empty() {
match NUMERALS.iter().find(|&&(rn, _)| text.starts_with(rn)) {
Some(&(rn, val)) => {
Expand Down
4 changes: 2 additions & 2 deletions src/test/auxiliary/unboxed-closures-cross-crate.rs
Expand Up @@ -14,9 +14,9 @@ use std::ops::Add;

#[inline]
pub fn has_closures() -> uint {
let x = 1u;
let x = 1_usize;
let mut f = move || x;
let y = 1u;
let y = 1_usize;
let g = || y;
f() + g()
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/bench/noise.rs
Expand Up @@ -104,9 +104,9 @@ fn main() {
let mut pixels = [0f32; 256*256];
let n2d = Noise2DContext::new();

for _ in 0u..100 {
for y in 0u..256 {
for x in 0u..256 {
for _ in 0..100 {
for y in 0..256 {
for x in 0..256 {
let v = n2d.get(x as f32 * 0.1, y as f32 * 0.1);
pixels[y*256+x] = v * 0.5 + 0.5;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail-fulldeps/issue-18986.rs
Expand Up @@ -15,6 +15,6 @@ pub use use_from_trait_xc::Trait;

fn main() {
match () {
Trait { x: 42us } => () //~ ERROR use of trait `Trait` in a struct pattern
Trait { x: 42_usize } => () //~ ERROR use of trait `Trait` in a struct pattern
}
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/asm-misplaced-option.rs
Expand Up @@ -28,7 +28,7 @@ pub fn main() {

unsafe {
// comma in place of a colon
asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8us) : "cc", "volatile");
asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
//~^ WARNING expected a clobber, found an option
}
assert_eq!(x, 13);
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/assign-to-method.rs
Expand Up @@ -15,7 +15,7 @@ struct cat {
}

impl cat {
pub fn speak(&self) { self.meows += 1us; }
pub fn speak(&self) { self.meows += 1_usize; }
}

fn cat(in_x : usize, in_y : isize) -> cat {
Expand All @@ -26,6 +26,6 @@ fn cat(in_x : usize, in_y : isize) -> cat {
}

fn main() {
let nyan : cat = cat(52us, 99);
let nyan : cat = cat(52_usize, 99);
nyan.speak = || println!("meow"); //~ ERROR attempted to take value of method
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/attr-before-let.rs
Expand Up @@ -10,5 +10,5 @@

fn main() {
#[attr] //~ ERROR expected item
let _i = 0;
let __isize = 0;
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/bad-bang-ann-3.rs
Expand Up @@ -11,7 +11,7 @@
// Tests that a function with a ! annotation always actually fails

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

fn main() { bad_bang(5); }
2 changes: 1 addition & 1 deletion src/test/compile-fail/bad-bang-ann.rs
Expand Up @@ -11,7 +11,7 @@
// Tests that a function with a ! annotation always actually fails

fn bad_bang(i: usize) -> ! { //~ ERROR computation may converge in a function marked as diverging
if i < 0us { } else { panic!(); }
if i < 0_usize { } else { panic!(); }
}

fn main() { bad_bang(5); }
2 changes: 1 addition & 1 deletion src/test/compile-fail/bad-method-typaram-kind.rs
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

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

trait bar {
Expand Down
12 changes: 6 additions & 6 deletions src/test/compile-fail/borrow-immutable-upvar-mutation.rs
Expand Up @@ -21,25 +21,25 @@ fn to_fn_mut<A,F:FnMut<A>>(f: F) -> F { f }
fn main() {
// By-ref captures
{
let mut x = 0us;
let mut x = 0_usize;
let _f = to_fn(|| x = 42); //~ ERROR cannot assign

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

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

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

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

let mut z = 0us;
let mut z = 0_usize;
let _h = to_fn_mut(move || { set(&mut z); to_fn(move || z = 42); }); //~ ERROR cannot assign
}
}
Expand Up @@ -56,15 +56,15 @@ impl Point {
}

fn deref_imm_field(x: Own<Point>) {
let _i = &x.y;
let __isize = &x.y;
}

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

fn deref_mut_field2(mut x: Own<Point>) {
let _i = &mut x.y;
let __isize = &mut x.y;
}

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

Expand Down
Expand Up @@ -50,15 +50,15 @@ impl Point {
}

fn deref_imm_field(x: Rc<Point>) {
let _i = &x.y;
let __isize = &x.y;
}

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

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

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

fn deref_imm_method(x: Rc<Point>) {
let _i = x.get();
let __isize = x.get();
}

fn deref_mut_method1(x: Rc<Point>) {
Expand Down
6 changes: 3 additions & 3 deletions src/test/compile-fail/borrowck-borrow-overloaded-deref-mut.rs
Expand Up @@ -32,15 +32,15 @@ impl<T> DerefMut for Own<T> {
}

fn deref_imm(x: Own<isize>) {
let _i = &*x;
let __isize = &*x;
}

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

fn deref_mut2(mut x: Own<isize>) {
let _i = &mut *x;
let __isize = &mut *x;
}

fn deref_extend<'a>(x: &'a Own<isize>) -> &'a isize {
Expand Down
6 changes: 3 additions & 3 deletions src/test/compile-fail/borrowck-borrow-overloaded-deref.rs
Expand Up @@ -26,15 +26,15 @@ impl<T> Deref for Rc<T> {
}

fn deref_imm(x: Rc<isize>) {
let _i = &*x;
let __isize = &*x;
}

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

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

fn deref_extend<'a>(x: &'a Rc<isize>) -> &'a isize {
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/borrowck-lend-flow-match.rs
Expand Up @@ -21,7 +21,7 @@ fn separate_arms() {
// fact no outstanding loan of x!
x = Some(0);
}
Some(ref _i) => {
Some(ref __isize) => {
x = Some(1); //~ ERROR cannot assign
}
}
Expand Down
Expand Up @@ -11,7 +11,7 @@
#![allow(dead_code)]
fn main() {
// Original borrow ends at end of function
let mut x = 1us;
let mut x = 1_usize;
let y = &mut x;
let z = &x; //~ ERROR cannot borrow
}
Expand All @@ -21,7 +21,7 @@ fn foo() {
match true {
true => {
// Original borrow ends at end of match arm
let mut x = 1us;
let mut x = 1_usize;
let y = &x;
let z = &mut x; //~ ERROR cannot borrow
}
Expand All @@ -33,7 +33,7 @@ fn foo() {
fn bar() {
// Original borrow ends at end of closure
|| {
let mut x = 1us;
let mut x = 1_usize;
let y = &mut x;
let z = &mut x; //~ ERROR cannot borrow
};
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/class-method-missing.rs
Expand Up @@ -27,5 +27,5 @@ fn cat(in_x : usize) -> cat {
}

fn main() {
let nyan = cat(0us);
let nyan = cat(0_usize);
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/class-missing-self.rs
Expand Up @@ -16,7 +16,7 @@ impl cat {
fn sleep(&self) { loop{} }
fn meow(&self) {
println!("Meow");
meows += 1us; //~ ERROR unresolved name
meows += 1_usize; //~ ERROR unresolved name
sleep(); //~ ERROR unresolved name
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/const-block-non-item-statement.rs
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

const A: usize = { 1us; 2 };
const A: usize = { 1_usize; 2 };
//~^ ERROR: blocks in constants are limited to items and tail expressions

const B: usize = { { } 2 };
Expand All @@ -19,7 +19,7 @@ macro_rules! foo {
}
const C: usize = { foo!(); 2 };

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

pub fn main() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/deriving-non-type.rs
Expand Up @@ -22,10 +22,10 @@ impl S { }
impl T for S { }

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

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

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

0 comments on commit 72eb214

Please sign in to comment.