diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-02-18 05:42:01 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-02-18 09:10:10 -0500 |
| commit | 72eb214ee473e7fbb8fb27ba10d6e43d02bb633b (patch) | |
| tree | 3790edad3c83732606f22e6408414ea810108fba /src/test/compile-fail | |
| parent | 8c34b26606d3cbff5216b1e180236573e304a872 (diff) | |
| download | rust-72eb214ee473e7fbb8fb27ba10d6e43d02bb633b.tar.gz rust-72eb214ee473e7fbb8fb27ba10d6e43d02bb633b.zip | |
Update suffixes en masse in tests using `perl -p -i -e`
Diffstat (limited to 'src/test/compile-fail')
80 files changed, 142 insertions, 142 deletions
diff --git a/src/test/compile-fail/asm-misplaced-option.rs b/src/test/compile-fail/asm-misplaced-option.rs index a29ead02b61..02d06c4e1bf 100644 --- a/src/test/compile-fail/asm-misplaced-option.rs +++ b/src/test/compile-fail/asm-misplaced-option.rs @@ -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); diff --git a/src/test/compile-fail/assign-to-method.rs b/src/test/compile-fail/assign-to-method.rs index b8aba7c483d..d32ea327d0a 100644 --- a/src/test/compile-fail/assign-to-method.rs +++ b/src/test/compile-fail/assign-to-method.rs @@ -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 { @@ -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 } diff --git a/src/test/compile-fail/attr-before-let.rs b/src/test/compile-fail/attr-before-let.rs index acc9aa8a9a1..b4a90e35c40 100644 --- a/src/test/compile-fail/attr-before-let.rs +++ b/src/test/compile-fail/attr-before-let.rs @@ -10,5 +10,5 @@ fn main() { #[attr] //~ ERROR expected item - let _i = 0; + let __isize = 0; } diff --git a/src/test/compile-fail/bad-bang-ann-3.rs b/src/test/compile-fail/bad-bang-ann-3.rs index a35e0a13b02..58a8314af21 100644 --- a/src/test/compile-fail/bad-bang-ann-3.rs +++ b/src/test/compile-fail/bad-bang-ann-3.rs @@ -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); } diff --git a/src/test/compile-fail/bad-bang-ann.rs b/src/test/compile-fail/bad-bang-ann.rs index aa073d82d30..03c24c2fa3d 100644 --- a/src/test/compile-fail/bad-bang-ann.rs +++ b/src/test/compile-fail/bad-bang-ann.rs @@ -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); } diff --git a/src/test/compile-fail/bad-method-typaram-kind.rs b/src/test/compile-fail/bad-method-typaram-kind.rs index 8e5a6054b89..a97cf5d41e8 100644 --- a/src/test/compile-fail/bad-method-typaram-kind.rs +++ b/src/test/compile-fail/bad-method-typaram-kind.rs @@ -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 { diff --git a/src/test/compile-fail/borrow-immutable-upvar-mutation.rs b/src/test/compile-fail/borrow-immutable-upvar-mutation.rs index 7033f5caef6..a82aa12dc80 100644 --- a/src/test/compile-fail/borrow-immutable-upvar-mutation.rs +++ b/src/test/compile-fail/borrow-immutable-upvar-mutation.rs @@ -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 } } diff --git a/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs b/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs index 5db9ad2e3a4..dd278faa0dc 100644 --- a/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs +++ b/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref-mut.rs @@ -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 { @@ -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(); } */ diff --git a/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref.rs b/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref.rs index 75680de9c9e..693ed29bd05 100644 --- a/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref.rs +++ b/src/test/compile-fail/borrowck-borrow-overloaded-auto-deref.rs @@ -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 { @@ -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>) { diff --git a/src/test/compile-fail/borrowck-borrow-overloaded-deref-mut.rs b/src/test/compile-fail/borrowck-borrow-overloaded-deref-mut.rs index bfe53b739f4..34b926aab1f 100644 --- a/src/test/compile-fail/borrowck-borrow-overloaded-deref-mut.rs +++ b/src/test/compile-fail/borrowck-borrow-overloaded-deref-mut.rs @@ -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 { diff --git a/src/test/compile-fail/borrowck-borrow-overloaded-deref.rs b/src/test/compile-fail/borrowck-borrow-overloaded-deref.rs index 153368f4894..5b916243b9e 100644 --- a/src/test/compile-fail/borrowck-borrow-overloaded-deref.rs +++ b/src/test/compile-fail/borrowck-borrow-overloaded-deref.rs @@ -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 { diff --git a/src/test/compile-fail/borrowck-lend-flow-match.rs b/src/test/compile-fail/borrowck-lend-flow-match.rs index 30ec993ed5e..f24e82d11c5 100644 --- a/src/test/compile-fail/borrowck-lend-flow-match.rs +++ b/src/test/compile-fail/borrowck-lend-flow-match.rs @@ -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 } } diff --git a/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs b/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs index 7093da6803c..21637370724 100644 --- a/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs +++ b/src/test/compile-fail/borrowck-report-with-custom-diagnostic.rs @@ -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 } @@ -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 } @@ -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 }; diff --git a/src/test/compile-fail/class-method-missing.rs b/src/test/compile-fail/class-method-missing.rs index 3b921e07279..ada45e8c1fc 100644 --- a/src/test/compile-fail/class-method-missing.rs +++ b/src/test/compile-fail/class-method-missing.rs @@ -27,5 +27,5 @@ fn cat(in_x : usize) -> cat { } fn main() { - let nyan = cat(0us); + let nyan = cat(0_usize); } diff --git a/src/test/compile-fail/class-missing-self.rs b/src/test/compile-fail/class-missing-self.rs index 4d8e4bca784..f25b2e65388 100644 --- a/src/test/compile-fail/class-missing-self.rs +++ b/src/test/compile-fail/class-missing-self.rs @@ -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 } diff --git a/src/test/compile-fail/const-block-non-item-statement.rs b/src/test/compile-fail/const-block-non-item-statement.rs index f66c68541b1..fa63b16afa6 100644 --- a/src/test/compile-fail/const-block-non-item-statement.rs +++ b/src/test/compile-fail/const-block-non-item-statement.rs @@ -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 }; @@ -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() { diff --git a/src/test/compile-fail/deriving-non-type.rs b/src/test/compile-fail/deriving-non-type.rs index 6015652668e..966e28a789c 100644 --- a/src/test/compile-fail/deriving-non-type.rs +++ b/src/test/compile-fail/deriving-non-type.rs @@ -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 { } diff --git a/src/test/compile-fail/feature-gate-int-uint.rs b/src/test/compile-fail/feature-gate-int-uint.rs index 016a0394289..344afa34799 100644 --- a/src/test/compile-fail/feature-gate-int-uint.rs +++ b/src/test/compile-fail/feature-gate-int-uint.rs @@ -16,7 +16,7 @@ mod u { x: uint //~ WARN the `uint` type is deprecated } fn bar(x: uint) { //~ WARN the `uint` type is deprecated - 1u; //~ WARN the `u` suffix on integers is deprecated + 1_usize; } } mod i { @@ -25,7 +25,7 @@ mod i { x: int //~ WARN the `int` type is deprecated } fn bar(x: int) { //~ WARN the `int` type is deprecated - 1i; //~ WARN the `i` suffix on integers is deprecated + 1_isize; } } diff --git a/src/test/compile-fail/import-glob-circular.rs b/src/test/compile-fail/import-glob-circular.rs index 0f6e3dc134d..f38172db444 100644 --- a/src/test/compile-fail/import-glob-circular.rs +++ b/src/test/compile-fail/import-glob-circular.rs @@ -13,13 +13,13 @@ mod circ1 { pub use circ2::f2; pub fn f1() { println!("f1"); } - pub fn common() -> usize { return 0us; } + pub fn common() -> usize { return 0_usize; } } mod circ2 { pub use circ1::f1; pub fn f2() { println!("f2"); } - pub fn common() -> usize { return 1us; } + pub fn common() -> usize { return 1_usize; } } mod test { diff --git a/src/test/compile-fail/index-bot.rs b/src/test/compile-fail/index-bot.rs index 876c1e481f6..b28f2a746fd 100644 --- a/src/test/compile-fail/index-bot.rs +++ b/src/test/compile-fail/index-bot.rs @@ -9,5 +9,5 @@ // except according to those terms. fn main() { - (return)[0us]; //~ ERROR the type of this value must be known in this context + (return)[0_usize]; //~ ERROR the type of this value must be known in this context } diff --git a/src/test/compile-fail/infinite-instantiation.rs b/src/test/compile-fail/infinite-instantiation.rs index a922f5fe452..2642ac6204c 100644 --- a/src/test/compile-fail/infinite-instantiation.rs +++ b/src/test/compile-fail/infinite-instantiation.rs @@ -28,11 +28,11 @@ impl<T:Clone> to_opt for Option<T> { } fn function<T:to_opt + Clone>(counter: usize, t: T) { - if counter > 0us { - function(counter - 1us, t.to_option()); + if counter > 0_usize { + function(counter - 1_usize, t.to_option()); } } fn main() { - function(22us, 22us); + function(22_usize, 22_usize); } diff --git a/src/test/compile-fail/integral-indexing.rs b/src/test/compile-fail/integral-indexing.rs index 88dd63384b7..e8998dd7a9d 100644 --- a/src/test/compile-fail/integral-indexing.rs +++ b/src/test/compile-fail/integral-indexing.rs @@ -11,7 +11,7 @@ pub fn main() { let v: Vec<isize> = vec!(0, 1, 2, 3, 4, 5); let s: String = "abcdef".to_string(); - v[3us]; + v[3_usize]; v[3]; v[3u8]; //~ERROR the trait `core::ops::Index<u8>` is not implemented //~^ ERROR the trait `core::ops::Index<u8>` is not implemented @@ -21,7 +21,7 @@ pub fn main() { //~^ ERROR the trait `core::ops::Index<u32>` is not implemented v[3i32]; //~ERROR the trait `core::ops::Index<i32>` is not implemented //~^ ERROR the trait `core::ops::Index<i32>` is not implemented - s.as_bytes()[3us]; + s.as_bytes()[3_usize]; s.as_bytes()[3]; s.as_bytes()[3u8]; //~ERROR the trait `core::ops::Index<u8>` is not implemented //~^ERROR the trait `core::ops::Index<u8>` is not implemented diff --git a/src/test/compile-fail/issue-13466.rs b/src/test/compile-fail/issue-13466.rs index 09e2905dc40..16128e52d64 100644 --- a/src/test/compile-fail/issue-13466.rs +++ b/src/test/compile-fail/issue-13466.rs @@ -14,7 +14,7 @@ pub fn main() { // The expected arm type `Option<T>` has one type parameter, while // the actual arm `Result<T, E>` has two. typeck should not be // tricked into looking up a non-existing second type parameter. - let _x: usize = match Some(1us) { + let _x: usize = match Some(1_usize) { Ok(u) => u, //~^ ERROR mismatched types //~| expected `core::option::Option<usize>` diff --git a/src/test/compile-fail/issue-17283.rs b/src/test/compile-fail/issue-17283.rs index 4889658d083..65731379094 100644 --- a/src/test/compile-fail/issue-17283.rs +++ b/src/test/compile-fail/issue-17283.rs @@ -16,7 +16,7 @@ struct Foo { } fn main() { - let x = 1us; + let x = 1_usize; let y: Foo; // `x { ... }` should not be interpreted as a struct literal here diff --git a/src/test/compile-fail/issue-17441.rs b/src/test/compile-fail/issue-17441.rs index e9e69dadd3b..321b8b260da 100644 --- a/src/test/compile-fail/issue-17441.rs +++ b/src/test/compile-fail/issue-17441.rs @@ -11,16 +11,16 @@ #![feature(box_syntax)] fn main() { - let _foo = &[1us, 2] as [usize]; + let _foo = &[1_usize, 2] as [usize]; //~^ ERROR cast to unsized type: `&[usize; 2]` as `[usize]` //~^^ HELP consider using an implicit coercion to `&[usize]` instead - let _bar = box 1us as std::fmt::Show; + let _bar = box 1_usize as std::fmt::Show; //~^ ERROR cast to unsized type: `Box<usize>` as `core::fmt::Show` //~^^ HELP did you mean `Box<core::fmt::Show>`? - let _baz = 1us as std::fmt::Show; + let _baz = 1_usize as std::fmt::Show; //~^ ERROR cast to unsized type: `usize` as `core::fmt::Show` //~^^ HELP consider using a box or reference as appropriate - let _quux = [1us, 2] as [usize]; + let _quux = [1_usize, 2] as [usize]; //~^ ERROR cast to unsized type: `[usize; 2]` as `[usize]` //~^^ HELP consider using a box or reference as appropriate } diff --git a/src/test/compile-fail/issue-17651.rs b/src/test/compile-fail/issue-17651.rs index 1cdf48e291c..172f37af834 100644 --- a/src/test/compile-fail/issue-17651.rs +++ b/src/test/compile-fail/issue-17651.rs @@ -14,7 +14,7 @@ #![feature(box_syntax)] fn main() { - (|| box *[0us].as_slice())(); + (|| box *[0_usize].as_slice())(); //~^ ERROR cannot move out of borrowed content //~^^ ERROR cannot move a value of type [usize] } diff --git a/src/test/compile-fail/issue-17718-patterns.rs b/src/test/compile-fail/issue-17718-patterns.rs index 6c4d0874703..b7f58791bfc 100644 --- a/src/test/compile-fail/issue-17718-patterns.rs +++ b/src/test/compile-fail/issue-17718-patterns.rs @@ -13,7 +13,7 @@ static mut A2: usize = 1; const A3: usize = 1; fn main() { - match 1us { + match 1_usize { A1 => {} //~ ERROR: static variables cannot be referenced in a pattern A2 => {} //~ ERROR: static variables cannot be referenced in a pattern A3 => {} diff --git a/src/test/compile-fail/issue-17913.rs b/src/test/compile-fail/issue-17913.rs index 1f5264aef61..8035cffabda 100644 --- a/src/test/compile-fail/issue-17913.rs +++ b/src/test/compile-fail/issue-17913.rs @@ -15,14 +15,14 @@ #[cfg(target_pointer_width = "64")] fn main() { - let n = 0us; - let a = box [&n; 0xF000000000000000us]; - println!("{}", a[0xFFFFFFu]); + let n = 0_usize; + let a = box [&n; 0xF000000000000000_usize]; + println!("{}", a[0xFFFFFF_usize]); } #[cfg(target_pointer_width = "32")] fn main() { - let n = 0us; - let a = box [&n; 0xFFFFFFFFu]; - println!("{}", a[0xFFFFFFu]); + let n = 0_usize; + let a = box [&n; 0xFFFFFFFF_usize]; + println!("{}", a[0xFFFFFF_usize]); } diff --git a/src/test/compile-fail/issue-17933.rs b/src/test/compile-fail/issue-17933.rs index 47f8d75250d..bd047408498 100644 --- a/src/test/compile-fail/issue-17933.rs +++ b/src/test/compile-fail/issue-17933.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -pub static X: usize = 1us; +pub static X: usize = 1_usize; fn main() { - match 1us { + match 1_usize { self::X => { }, //~^ ERROR static variables cannot be referenced in a pattern, use a `const` instead _ => { }, diff --git a/src/test/compile-fail/issue-1802-2.rs b/src/test/compile-fail/issue-1802-2.rs index c7aacdfc68a..f6da2fc82c3 100644 --- a/src/test/compile-fail/issue-1802-2.rs +++ b/src/test/compile-fail/issue-1802-2.rs @@ -10,5 +10,5 @@ // error-pattern:no valid digits found for number fn main() { - log(error, 0bu); + log(error, 0b_usize); } diff --git a/src/test/compile-fail/issue-18107.rs b/src/test/compile-fail/issue-18107.rs index 83427e8aa67..91689988f58 100644 --- a/src/test/compile-fail/issue-18107.rs +++ b/src/test/compile-fail/issue-18107.rs @@ -16,7 +16,7 @@ fn _create_render(_: &()) -> AbstractRenderer //~^ ERROR: the trait `core::marker::Sized` is not implemented { - match 0us { + match 0_usize { _ => unimplemented!() } } diff --git a/src/test/compile-fail/issue-18252.rs b/src/test/compile-fail/issue-18252.rs index 822c86d1d3e..54c51405bd7 100644 --- a/src/test/compile-fail/issue-18252.rs +++ b/src/test/compile-fail/issue-18252.rs @@ -13,5 +13,5 @@ enum Foo { } fn main() { - let f = Foo::Variant(42us); //~ ERROR uses it like a function + let f = Foo::Variant(42_usize); //~ ERROR uses it like a function } diff --git a/src/test/compile-fail/issue-18566.rs b/src/test/compile-fail/issue-18566.rs index 85dda340d19..dd3844b1a0e 100644 --- a/src/test/compile-fail/issue-18566.rs +++ b/src/test/compile-fail/issue-18566.rs @@ -28,7 +28,7 @@ impl Tr for usize { } fn main() { - let s = &mut 1us; + let s = &mut 1_usize; MyPtr(s).poke(s); //~^ ERROR cannot borrow `*s` as mutable more than once at a time diff --git a/src/test/compile-fail/issue-18783.rs b/src/test/compile-fail/issue-18783.rs index d26bf68cb5d..5ddf06add9d 100644 --- a/src/test/compile-fail/issue-18783.rs +++ b/src/test/compile-fail/issue-18783.rs @@ -13,7 +13,7 @@ use std::cell::RefCell; fn main() { - let mut y = 1us; + let mut y = 1_usize; let c = RefCell::new(vec![]); c.push(box || y = 0); c.push(box || y = 0); @@ -21,7 +21,7 @@ fn main() { } fn ufcs() { - let mut y = 1us; + let mut y = 1_usize; let c = RefCell::new(vec![]); Push::push(&c, box || y = 0); diff --git a/src/test/compile-fail/issue-18959.rs b/src/test/compile-fail/issue-18959.rs index e174fb9b7ad..368f3c16f51 100644 --- a/src/test/compile-fail/issue-18959.rs +++ b/src/test/compile-fail/issue-18959.rs @@ -17,7 +17,7 @@ impl Foo for Thing { fn foo<T>(&self, _: &T) {} } -#[inline(never)] fn foo(b: &Bar) { b.foo(&0us) } +#[inline(never)] fn foo(b: &Bar) { b.foo(&0_usize) } fn main() { let mut thing = Thing; diff --git a/src/test/compile-fail/issue-2150.rs b/src/test/compile-fail/issue-2150.rs index 79df16c8979..505885e6c41 100644 --- a/src/test/compile-fail/issue-2150.rs +++ b/src/test/compile-fail/issue-2150.rs @@ -15,7 +15,7 @@ fn fail_len(v: Vec<isize> ) -> usize { let mut i = 3; panic!(); - for x in &v { i += 1us; } + for x in &v { i += 1_usize; } //~^ ERROR: unreachable statement return i; } diff --git a/src/test/compile-fail/issue-4517.rs b/src/test/compile-fail/issue-4517.rs index 881e124fd68..6d4777be40b 100644 --- a/src/test/compile-fail/issue-4517.rs +++ b/src/test/compile-fail/issue-4517.rs @@ -11,7 +11,7 @@ fn bar(int_param: usize) {} fn main() { - let foo: [u8; 4] = [1u8; 4us]; + let foo: [u8; 4] = [1u8; 4_usize]; bar(foo); //~^ ERROR mismatched types //~| expected `usize` diff --git a/src/test/compile-fail/issue-5544-a.rs b/src/test/compile-fail/issue-5544-a.rs index 42a18ba5fb7..95a4f36d171 100644 --- a/src/test/compile-fail/issue-5544-a.rs +++ b/src/test/compile-fail/issue-5544-a.rs @@ -9,6 +9,6 @@ // except according to those terms. fn main() { - let _i = 18446744073709551616; // 2^64 + let __isize = 18446744073709551616; // 2^64 //~^ ERROR int literal is too large } diff --git a/src/test/compile-fail/issue-5544-b.rs b/src/test/compile-fail/issue-5544-b.rs index 1f166ec0d1c..afff5984b46 100644 --- a/src/test/compile-fail/issue-5544-b.rs +++ b/src/test/compile-fail/issue-5544-b.rs @@ -9,6 +9,6 @@ // except according to those terms. fn main() { - let _i = 0xff_ffff_ffff_ffff_ffff_is; + let __isize = 0xff_ffff_ffff_ffff_ffff__isize; //~^ ERROR int literal is too large } diff --git a/src/test/compile-fail/issue-7575.rs b/src/test/compile-fail/issue-7575.rs index 49e54f25bf6..9e6000c050a 100644 --- a/src/test/compile-fail/issue-7575.rs +++ b/src/test/compile-fail/issue-7575.rs @@ -30,17 +30,17 @@ trait UnusedTrait { impl CtxtFn for usize { fn f8(self, i: usize) -> usize { - i * 4us + i * 4_usize } fn f9(i: usize) -> usize { - i * 4us + i * 4_usize } } impl OtherTrait for usize { fn f9(i: usize) -> usize { - i * 8us + i * 8_usize } } diff --git a/src/test/compile-fail/issue-8460-const.rs b/src/test/compile-fail/issue-8460-const.rs index b6d371e4b11..954ae8ebc48 100644 --- a/src/test/compile-fail/issue-8460-const.rs +++ b/src/test/compile-fail/issue-8460-const.rs @@ -22,7 +22,7 @@ fn main() { //~^ ERROR attempted to divide with overflow in a constant expression assert!(thread::spawn(move|| { i64::MIN / -1; }).join().is_err()); //~^ ERROR attempted to divide with overflow in a constant expression - assert!(thread::spawn(move|| { 1is / 0; }).join().is_err()); + assert!(thread::spawn(move|| { 1isize / 0; }).join().is_err()); //~^ ERROR attempted to divide by zero in a constant expression assert!(thread::spawn(move|| { 1i8 / 0; }).join().is_err()); //~^ ERROR attempted to divide by zero in a constant expression @@ -42,7 +42,7 @@ fn main() { //~^ ERROR attempted remainder with overflow in a constant expression assert!(thread::spawn(move|| { i64::MIN % -1; }).join().is_err()); //~^ ERROR attempted remainder with overflow in a constant expression - assert!(thread::spawn(move|| { 1is % 0; }).join().is_err()); + assert!(thread::spawn(move|| { 1isize % 0; }).join().is_err()); //~^ ERROR attempted remainder with a divisor of zero in a constant expression assert!(thread::spawn(move|| { 1i8 % 0; }).join().is_err()); //~^ ERROR attempted remainder with a divisor of zero in a constant expression diff --git a/src/test/compile-fail/issue-8537.rs b/src/test/compile-fail/issue-8537.rs index dba9e751f71..52cf420a9ff 100644 --- a/src/test/compile-fail/issue-8537.rs +++ b/src/test/compile-fail/issue-8537.rs @@ -9,7 +9,7 @@ // except according to those terms. pub extern - "invalid-abi" //~ ERROR illegal ABI + "invalid-ab_isize" //~ ERROR illegal ABI fn foo() {} fn main() {} diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 5bc769f8e11..e6041cddead 100644 --- a/src/test/compile-fail/kindck-nonsendable-1.rs +++ b/src/test/compile-fail/kindck-nonsendable-1.rs @@ -16,7 +16,7 @@ fn foo(_x: Rc<usize>) {} fn bar<F:FnOnce() + Send>(_: F) { } fn main() { - let x = Rc::new(3us); + let x = Rc::new(3_usize); bar(move|| foo(x)); //~^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/lint-dead-code-4.rs b/src/test/compile-fail/lint-dead-code-4.rs index 449788459dc..f304c26efb5 100644 --- a/src/test/compile-fail/lint-dead-code-4.rs +++ b/src/test/compile-fail/lint-dead-code-4.rs @@ -63,6 +63,6 @@ fn field_match_in_let(f: Bar) -> bool { fn main() { field_read(Foo { x: 1, b: false, marker: std::marker::NoCopy }); field_match_in_patterns(XYZ::Z); - field_match_in_let(Bar { x: 42us, b: true, _guard: () }); + field_match_in_let(Bar { x: 42_usize, b: true, _guard: () }); let _ = Baz { x: 0 }; } diff --git a/src/test/compile-fail/lint-exceeding-bitshifts.rs b/src/test/compile-fail/lint-exceeding-bitshifts.rs index 98853a2e9a1..345e56e2e58 100644 --- a/src/test/compile-fail/lint-exceeding-bitshifts.rs +++ b/src/test/compile-fail/lint-exceeding-bitshifts.rs @@ -57,7 +57,7 @@ fn main() { let n = 1u8 << (4+3); let n = 1u8 << (4+4); //~ ERROR: bitshift exceeds the type's number of bits - let n = 1is << std::isize::BITS; //~ ERROR: bitshift exceeds the type's number of bits - let n = 1us << std::usize::BITS; //~ ERROR: bitshift exceeds the type's number of bits + let n = 1_isize << std::isize::BITS; //~ ERROR: bitshift exceeds the type's number of bits + let n = 1_usize << std::usize::BITS; //~ ERROR: bitshift exceeds the type's number of bits } diff --git a/src/test/compile-fail/lint-obsolete-attr.rs b/src/test/compile-fail/lint-obsolete-attr.rs index dd4e1212a00..b234f08d04a 100644 --- a/src/test/compile-fail/lint-obsolete-attr.rs +++ b/src/test/compile-fail/lint-obsolete-attr.rs @@ -15,7 +15,7 @@ #![allow(dead_code)] #![feature(custom_attribute)] -#[abi="stdcall"] extern {} //~ ERROR unused attribute +#[ab_isize="stdcall"] extern {} //~ ERROR unused attribute #[fixed_stack_segment] fn f() {} //~ ERROR unused attribute diff --git a/src/test/compile-fail/lint-type-limits.rs b/src/test/compile-fail/lint-type-limits.rs index 95d892010e7..c00bd2adaa2 100644 --- a/src/test/compile-fail/lint-type-limits.rs +++ b/src/test/compile-fail/lint-type-limits.rs @@ -14,7 +14,7 @@ fn main() { } fn foo() { - let mut i = 100us; + let mut i = 100_usize; while i >= 0 { //~ ERROR comparison is useless due to type limits i -= 1; } @@ -50,12 +50,12 @@ fn qux() { } fn quy() { - let i = -23us; //~ WARNING negation of unsigned int literal may be unintentional + let i = -23_usize; //~ WARNING negation of unsigned int literal may be unintentional //~^ WARNING unused variable } fn quz() { - let i = 23us; + let i = 23_usize; let j = -i; //~ WARNING negation of unsigned int variable may be unintentional //~^ WARNING unused variable } diff --git a/src/test/compile-fail/macro-no-implicit-reexport.rs b/src/test/compile-fail/macro-no-implicit-reexport.rs index 1e2172f4a7c..13dbab12b77 100644 --- a/src/test/compile-fail/macro-no-implicit-reexport.rs +++ b/src/test/compile-fail/macro-no-implicit-reexport.rs @@ -16,5 +16,5 @@ extern crate macro_non_reexport_2; fn main() { - assert_eq!(reexported!(), 3us); //~ ERROR macro undefined + assert_eq!(reexported!(), 3_usize); //~ ERROR macro undefined } diff --git a/src/test/compile-fail/macro-reexport-not-locally-visible.rs b/src/test/compile-fail/macro-reexport-not-locally-visible.rs index 6859ccfe3b7..dc8f4fadc76 100644 --- a/src/test/compile-fail/macro-reexport-not-locally-visible.rs +++ b/src/test/compile-fail/macro-reexport-not-locally-visible.rs @@ -18,5 +18,5 @@ extern crate macro_reexport_1; fn main() { - assert_eq!(reexported!(), 3us); //~ ERROR macro undefined + assert_eq!(reexported!(), 3_usize); //~ ERROR macro undefined } diff --git a/src/test/compile-fail/match-ill-type1.rs b/src/test/compile-fail/match-ill-type1.rs index 908d46f398c..c60ef2ed287 100644 --- a/src/test/compile-fail/match-ill-type1.rs +++ b/src/test/compile-fail/match-ill-type1.rs @@ -10,7 +10,7 @@ fn main() { match 1 { - 1...2us => 1, //~ ERROR mismatched types in range + 1...2_usize => 1, //~ ERROR mismatched types in range _ => 2, }; } diff --git a/src/test/compile-fail/method-ambig-two-traits-cross-crate.rs b/src/test/compile-fail/method-ambig-two-traits-cross-crate.rs index cab6a8610bf..981c4c6f40d 100644 --- a/src/test/compile-fail/method-ambig-two-traits-cross-crate.rs +++ b/src/test/compile-fail/method-ambig-two-traits-cross-crate.rs @@ -18,5 +18,5 @@ trait me2 { fn me(&self) -> usize; } impl me2 for usize { fn me(&self) -> usize { *self } } -fn main() { 1us.me(); } //~ ERROR E0034 +fn main() { 1_usize.me(); } //~ ERROR E0034 diff --git a/src/test/compile-fail/method-ambig-two-traits-with-default-method.rs b/src/test/compile-fail/method-ambig-two-traits-with-default-method.rs index 87e3655d31e..17312fb1869 100644 --- a/src/test/compile-fail/method-ambig-two-traits-with-default-method.rs +++ b/src/test/compile-fail/method-ambig-two-traits-with-default-method.rs @@ -19,5 +19,5 @@ impl Foo for usize {} impl Bar for usize {} fn main() { - 1us.method(); //~ ERROR E0034 + 1_usize.method(); //~ ERROR E0034 } diff --git a/src/test/compile-fail/mutable-class-fields-2.rs b/src/test/compile-fail/mutable-class-fields-2.rs index 932c2a9715f..b6744d4b33a 100644 --- a/src/test/compile-fail/mutable-class-fields-2.rs +++ b/src/test/compile-fail/mutable-class-fields-2.rs @@ -29,6 +29,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.eat(); } diff --git a/src/test/compile-fail/mutable-class-fields.rs b/src/test/compile-fail/mutable-class-fields.rs index a840ac63dd8..94b1047f85e 100644 --- a/src/test/compile-fail/mutable-class-fields.rs +++ b/src/test/compile-fail/mutable-class-fields.rs @@ -21,6 +21,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.how_hungry = 0; //~ ERROR cannot assign } diff --git a/src/test/compile-fail/no-method-suggested-traits.rs b/src/test/compile-fail/no-method-suggested-traits.rs index 2c14dfad3b8..21f8a982806 100644 --- a/src/test/compile-fail/no-method-suggested-traits.rs +++ b/src/test/compile-fail/no-method-suggested-traits.rs @@ -123,8 +123,8 @@ fn main() { //~^^^ HELP `no_method_suggested_traits::foo::PubPub` // should have no help: - 1us.method3(); //~ ERROR does not implement - std::rc::Rc::new(&mut Box::new(&1us)).method3(); //~ ERROR does not implement + 1_usize.method3(); //~ ERROR does not implement + std::rc::Rc::new(&mut Box::new(&1_usize)).method3(); //~ ERROR does not implement no_method_suggested_traits::Foo.method3(); //~ ERROR does not implement std::rc::Rc::new(&mut Box::new(&no_method_suggested_traits::Foo)).method3(); //~^ ERROR does not implement diff --git a/src/test/compile-fail/non-exhaustive-pattern-witness.rs b/src/test/compile-fail/non-exhaustive-pattern-witness.rs index 3bd3a0c653c..0eb91e0419a 100644 --- a/src/test/compile-fail/non-exhaustive-pattern-witness.rs +++ b/src/test/compile-fail/non-exhaustive-pattern-witness.rs @@ -27,7 +27,7 @@ fn struct_with_a_nested_enum_and_vector() { Foo { first: true, second: None } => (), Foo { first: true, second: Some(_) } => (), Foo { first: false, second: None } => (), - Foo { first: false, second: Some([1us, 2us, 3us, 4us]) } => () + Foo { first: false, second: Some([1_usize, 2_usize, 3_usize, 4_usize]) } => () } } diff --git a/src/test/compile-fail/or-patter-mismatch.rs b/src/test/compile-fail/or-patter-mismatch.rs index 74f674e64ba..4b261d89888 100644 --- a/src/test/compile-fail/or-patter-mismatch.rs +++ b/src/test/compile-fail/or-patter-mismatch.rs @@ -12,4 +12,4 @@ enum blah { a(isize, isize, usize), b(isize, isize), } -fn main() { match blah::a(1, 1, 2us) { blah::a(_, x, y) | blah::b(x, y) => { } } } +fn main() { match blah::a(1, 1, 2_usize) { blah::a(_, x, y) | blah::b(x, y) => { } } } diff --git a/src/test/compile-fail/private-method.rs b/src/test/compile-fail/private-method.rs index e8e26cf8ce3..ccbdd52a983 100644 --- a/src/test/compile-fail/private-method.rs +++ b/src/test/compile-fail/private-method.rs @@ -30,6 +30,6 @@ mod kitties { } fn main() { - let nyan : kitties::cat = kitties::cat(52us, 99); + let nyan : kitties::cat = kitties::cat(52_usize, 99); nyan.nap(); } diff --git a/src/test/compile-fail/private-struct-field-cross-crate.rs b/src/test/compile-fail/private-struct-field-cross-crate.rs index 36b6000ceeb..243d835d46e 100644 --- a/src/test/compile-fail/private-struct-field-cross-crate.rs +++ b/src/test/compile-fail/private-struct-field-cross-crate.rs @@ -13,7 +13,7 @@ extern crate cci_class; use cci_class::kitties::cat; fn main() { - let nyan : cat = cat(52us, 99); - assert!((nyan.meows == 52us)); + let nyan : cat = cat(52_usize, 99); + assert!((nyan.meows == 52_usize)); //~^ ERROR field `meows` of struct `cci_class::kitties::cat` is private } diff --git a/src/test/compile-fail/regions-addr-of-self.rs b/src/test/compile-fail/regions-addr-of-self.rs index b69224d4499..45e468b3ab0 100644 --- a/src/test/compile-fail/regions-addr-of-self.rs +++ b/src/test/compile-fail/regions-addr-of-self.rs @@ -15,18 +15,18 @@ struct dog { impl dog { pub fn chase_cat(&mut self) { let p: &'static mut usize = &mut self.cats_chased; //~ ERROR cannot infer - *p += 1us; + *p += 1_usize; } pub fn chase_cat_2(&mut self) { let p: &mut usize = &mut self.cats_chased; - *p += 1us; + *p += 1_usize; } } fn dog() -> dog { dog { - cats_chased: 0us + cats_chased: 0_usize } } diff --git a/src/test/compile-fail/regions-addr-of-upvar-self.rs b/src/test/compile-fail/regions-addr-of-upvar-self.rs index 70d5fe83055..8cc2dd6afc6 100644 --- a/src/test/compile-fail/regions-addr-of-upvar-self.rs +++ b/src/test/compile-fail/regions-addr-of-upvar-self.rs @@ -18,7 +18,7 @@ impl dog { pub fn chase_cat(&mut self) { let _f = || { let p: &'static mut usize = &mut self.food; //~ ERROR cannot infer - *p = 3us; + *p = 3_usize; }; } } diff --git a/src/test/compile-fail/regions-creating-enums.rs b/src/test/compile-fail/regions-creating-enums.rs index 83cef9397c3..4c361427bf3 100644 --- a/src/test/compile-fail/regions-creating-enums.rs +++ b/src/test/compile-fail/regions-creating-enums.rs @@ -14,8 +14,8 @@ enum ast<'a> { } fn build() { - let x = ast::num(3us); - let y = ast::num(4us); + let x = ast::num(3_usize); + let y = ast::num(4_usize); let z = ast::add(&x, &y); compute(&z); } diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-decl.rs b/src/test/compile-fail/regions-infer-invariance-due-to-decl.rs index 5f4a1af6bf9..e88c96de9e4 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-decl.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-decl.rs @@ -14,12 +14,12 @@ struct invariant<'a> { marker: marker::InvariantLifetime<'a> } -fn to_same_lifetime<'r>(bi: invariant<'r>) { - let bj: invariant<'r> = bi; +fn to_same_lifetime<'r>(b_isize: invariant<'r>) { + let bj: invariant<'r> = b_isize; } -fn to_longer_lifetime<'r>(bi: invariant<'r>) -> invariant<'static> { - bi //~ ERROR mismatched types +fn to_longer_lifetime<'r>(b_isize: invariant<'r>) -> invariant<'static> { + b_isize //~ ERROR mismatched types } fn main() { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs index e42aa684e14..f280e4d978e 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-3.rs @@ -13,12 +13,12 @@ struct invariant<'a> { f: Box<FnOnce(&mut &'a isize) + 'static>, } -fn to_same_lifetime<'r>(bi: invariant<'r>) { - let bj: invariant<'r> = bi; +fn to_same_lifetime<'r>(b_isize: invariant<'r>) { + let bj: invariant<'r> = b_isize; } -fn to_longer_lifetime<'r>(bi: invariant<'r>) -> invariant<'static> { - bi //~ ERROR mismatched types +fn to_longer_lifetime<'r>(b_isize: invariant<'r>) -> invariant<'static> { + b_isize //~ ERROR mismatched types } fn main() { diff --git a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs index 2a246124f6f..ced0afcebd9 100644 --- a/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs +++ b/src/test/compile-fail/regions-infer-invariance-due-to-mutability-4.rs @@ -13,12 +13,12 @@ struct Invariant<'a> { f: Box<for<'b> FnOnce() -> &'b mut &'a isize + 'static>, } -fn to_same_lifetime<'r>(bi: Invariant<'r>) { - let bj: Invariant<'r> = bi; +fn to_same_lifetime<'r>(b_isize: Invariant<'r>) { + let bj: Invariant<'r> = b_isize; } -fn to_longer_lifetime<'r>(bi: Invariant<'r>) -> Invariant<'static> { - bi //~ ERROR mismatched types +fn to_longer_lifetime<'r>(b_isize: Invariant<'r>) -> Invariant<'static> { + b_isize //~ ERROR mismatched types } fn main() { diff --git a/src/test/compile-fail/regions-return-ref-to-upvar-issue-17403.rs b/src/test/compile-fail/regions-return-ref-to-upvar-issue-17403.rs index 2e3531a2e8f..aa20efa5a12 100644 --- a/src/test/compile-fail/regions-return-ref-to-upvar-issue-17403.rs +++ b/src/test/compile-fail/regions-return-ref-to-upvar-issue-17403.rs @@ -15,7 +15,7 @@ fn main() { // Unboxed closure case { - let mut x = 0us; + let mut x = 0_usize; let mut f = || &mut x; //~ ERROR cannot infer let x = f(); let y = f(); diff --git a/src/test/compile-fail/regions-trait-1.rs b/src/test/compile-fail/regions-trait-1.rs index 63052580dc2..b45a37d26e5 100644 --- a/src/test/compile-fail/regions-trait-1.rs +++ b/src/test/compile-fail/regions-trait-1.rs @@ -34,7 +34,7 @@ fn get_v(gc: Box<get_ctxt>) -> usize { } fn main() { - let ctxt = ctxt { v: 22us }; + let ctxt = ctxt { v: 22_usize }; let hc = has_ctxt { c: &ctxt }; - assert_eq!(get_v(box hc as Box<get_ctxt>), 22us); + assert_eq!(get_v(box hc as Box<get_ctxt>), 22_usize); } diff --git a/src/test/compile-fail/repeat_count.rs b/src/test/compile-fail/repeat_count.rs index d730add00b7..9b3e2668042 100644 --- a/src/test/compile-fail/repeat_count.rs +++ b/src/test/compile-fail/repeat_count.rs @@ -41,14 +41,14 @@ fn main() { //~| expected usize //~| found &-ptr //~| ERROR expected positive integer for repeat count, found string - let f = [0; -4is]; + let f = [0; -4_isize]; //~^ ERROR mismatched types //~| expected `usize` //~| found `isize` //~| expected usize //~| found isize //~| ERROR expected positive integer for repeat count, found negative integer - let f = [0us; -1is]; + let f = [0_usize; -1_isize]; //~^ ERROR mismatched types //~| expected `usize` //~| found `isize` diff --git a/src/test/compile-fail/shadowed-lifetime.rs b/src/test/compile-fail/shadowed-lifetime.rs index bf8a8f5046e..725f83d4957 100644 --- a/src/test/compile-fail/shadowed-lifetime.rs +++ b/src/test/compile-fail/shadowed-lifetime.rs @@ -39,5 +39,5 @@ fn main() { // just to ensure that this test fails to compile; when shadowed // lifetimes become either an error or a proper lint, this will // not be needed. - let x: isize = 3us; //~ ERROR mismatched types + let x: isize = 3_usize; //~ ERROR mismatched types } diff --git a/src/test/compile-fail/struct-base-wrong-type.rs b/src/test/compile-fail/struct-base-wrong-type.rs index 71a2b50b612..a2ad2336d4b 100644 --- a/src/test/compile-fail/struct-base-wrong-type.rs +++ b/src/test/compile-fail/struct-base-wrong-type.rs @@ -30,7 +30,7 @@ fn main() { //~| found `Bar` //~| expected struct `Foo` //~| found struct `Bar` - let f_i = Foo { a: 2, ..4 }; //~ ERROR mismatched types + let f__isize = Foo { a: 2, ..4 }; //~ ERROR mismatched types //~| expected `Foo` //~| found `_` //~| expected struct `Foo` diff --git a/src/test/compile-fail/tail-typeck.rs b/src/test/compile-fail/tail-typeck.rs index a934bbe61c4..9c1d318d588 100644 --- a/src/test/compile-fail/tail-typeck.rs +++ b/src/test/compile-fail/tail-typeck.rs @@ -12,6 +12,6 @@ fn f() -> isize { return g(); } -fn g() -> usize { return 0us; } +fn g() -> usize { return 0_usize; } fn main() { let y = f(); } diff --git a/src/test/compile-fail/unboxed-closure-illegal-move.rs b/src/test/compile-fail/unboxed-closure-illegal-move.rs index 224cbc2bef3..800126450c9 100644 --- a/src/test/compile-fail/unboxed-closure-illegal-move.rs +++ b/src/test/compile-fail/unboxed-closure-illegal-move.rs @@ -22,28 +22,28 @@ fn to_fn_once<A,F:FnOnce<A>>(f: F) -> F { f } fn main() { // By-ref cases { - let x = box 0us; + let x = box 0_usize; let f = to_fn(|| drop(x)); //~ ERROR cannot move } { - let x = box 0us; + let x = box 0_usize; let f = to_fn_mut(|| drop(x)); //~ ERROR cannot move } { - let x = box 0us; + let x = box 0_usize; let f = to_fn_once(|| drop(x)); // OK -- FnOnce } // By-value cases { - let x = box 0us; + let x = box 0_usize; let f = to_fn(move || drop(x)); //~ ERROR cannot move } { - let x = box 0us; + let x = box 0_usize; let f = to_fn_mut(move || drop(x)); //~ ERROR cannot move } { - let x = box 0us; + let x = box 0_usize; let f = to_fn_once(move || drop(x)); // this one is ok } } diff --git a/src/test/compile-fail/unboxed-closure-immutable-capture.rs b/src/test/compile-fail/unboxed-closure-immutable-capture.rs index 145b2bfaedd..b40a91181ad 100644 --- a/src/test/compile-fail/unboxed-closure-immutable-capture.rs +++ b/src/test/compile-fail/unboxed-closure-immutable-capture.rs @@ -17,7 +17,7 @@ fn set(x: &mut usize) { *x = 0; } fn main() { - let x = 0us; + let x = 0_usize; move || x = 1; //~ ERROR cannot assign move || set(&mut x); //~ ERROR cannot borrow move || x = 1; //~ ERROR cannot assign diff --git a/src/test/compile-fail/unboxed-closure-region.rs b/src/test/compile-fail/unboxed-closure-region.rs index 98ac54de8ad..59c84953718 100644 --- a/src/test/compile-fail/unboxed-closure-region.rs +++ b/src/test/compile-fail/unboxed-closure-region.rs @@ -14,7 +14,7 @@ // reference cannot escape the region of that variable. fn main() { let _f = { - let x = 0us; + let x = 0_usize; || x //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements }; } diff --git a/src/test/compile-fail/unboxed-closures-borrow-conflict.rs b/src/test/compile-fail/unboxed-closures-borrow-conflict.rs index 0bdc261e8c8..1191cfa2600 100644 --- a/src/test/compile-fail/unboxed-closures-borrow-conflict.rs +++ b/src/test/compile-fail/unboxed-closures-borrow-conflict.rs @@ -14,7 +14,7 @@ // cause borrow conflicts. fn main() { - let mut x = 0us; + let mut x = 0_usize; let f = || x += 1; let _y = x; //~ ERROR cannot use `x` because it was mutably borrowed } diff --git a/src/test/compile-fail/unboxed-closures-type-mismatch.rs b/src/test/compile-fail/unboxed-closures-type-mismatch.rs index e1192b22485..91182393ac8 100644 --- a/src/test/compile-fail/unboxed-closures-type-mismatch.rs +++ b/src/test/compile-fail/unboxed-closures-type-mismatch.rs @@ -14,6 +14,6 @@ use std::ops::FnMut; pub fn main() { let mut f = |x: isize, y: isize| -> isize { x + y }; - let z = f(1us, 2); //~ ERROR mismatched types + let z = f(1_usize, 2); //~ ERROR mismatched types println!("{}", z); } diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index d45a31abcb7..046337c33f0 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -12,7 +12,7 @@ use std::rc::Rc; -fn f<T:Send>(_i: T) { +fn f<T:Send>(__isize: T) { } fn main() { diff --git a/src/test/compile-fail/unique-vec-res.rs b/src/test/compile-fail/unique-vec-res.rs index b9ddc3f4de9..91a41ad6a49 100644 --- a/src/test/compile-fail/unique-vec-res.rs +++ b/src/test/compile-fail/unique-vec-res.rs @@ -28,7 +28,7 @@ impl<'a> Drop for r<'a> { } } -fn f<T>(_i: Vec<T> , _j: Vec<T> ) { +fn f<T>(__isize: Vec<T> , _j: Vec<T> ) { } fn clone<T: Clone>(t: &T) -> T { t.clone() } diff --git a/src/test/compile-fail/unreachable-arm.rs b/src/test/compile-fail/unreachable-arm.rs index 6434b0bde8d..eb5ffeaf888 100644 --- a/src/test/compile-fail/unreachable-arm.rs +++ b/src/test/compile-fail/unreachable-arm.rs @@ -15,4 +15,4 @@ enum foo { a(Box<foo>, isize), b(usize), } -fn main() { match foo::b(1us) { foo::b(_) | foo::a(box _, 1) => { } foo::a(_, 1) => { } } } +fn main() { match foo::b(1_usize) { foo::b(_) | foo::a(box _, 1) => { } foo::a(_, 1) => { } } } diff --git a/src/test/compile-fail/vtable-res-trait-param.rs b/src/test/compile-fail/vtable-res-trait-param.rs index c21d8274da0..cc6ff2d8ebc 100644 --- a/src/test/compile-fail/vtable-res-trait-param.rs +++ b/src/test/compile-fail/vtable-res-trait-param.rs @@ -23,7 +23,7 @@ impl TraitB for isize { } fn call_it<B:TraitB>(b: B) -> isize { - let y = 4us; + let y = 4_usize; b.gimme_an_a(y) //~ ERROR the trait `TraitA` is not implemented } |
