diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-01-08 22:05:56 +1100 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-01-08 11:02:24 -0500 |
| commit | 441044f071181b52144bad15a50bf91dc06771a5 (patch) | |
| tree | b25ff0d0753c6cfd459e0b37ec7f16a00e09c3e2 | |
| parent | 85f961e2ccf056965fd7a95c44ce0922a865ae8d (diff) | |
| download | rust-441044f071181b52144bad15a50bf91dc06771a5.tar.gz rust-441044f071181b52144bad15a50bf91dc06771a5.zip | |
Update compile-fail tests to use is/us, not i/u.
194 files changed, 379 insertions, 379 deletions
diff --git a/src/test/compile-fail/array-old-syntax-1.rs b/src/test/compile-fail/array-old-syntax-1.rs index 2dbc9e3da21..3b4810a86ab 100644 --- a/src/test/compile-fail/array-old-syntax-1.rs +++ b/src/test/compile-fail/array-old-syntax-1.rs @@ -11,5 +11,5 @@ // Test that the old fixed length array syntax is a parsing error. fn main() { - let _x: [isize, ..3] = [0i, 1, 2]; //~ ERROR + let _x: [isize, ..3] = [0is, 1, 2]; //~ ERROR } diff --git a/src/test/compile-fail/array-old-syntax-2.rs b/src/test/compile-fail/array-old-syntax-2.rs index df2cc305ca8..c1b88290bc3 100644 --- a/src/test/compile-fail/array-old-syntax-2.rs +++ b/src/test/compile-fail/array-old-syntax-2.rs @@ -11,5 +11,5 @@ // Test that the old repeating array syntax gives an error. fn main() { - let _ = [0i, ..3]; //~ ERROR + let _ = [0is, ..3]; //~ ERROR } diff --git a/src/test/compile-fail/asm-in-bad-modifier.rs b/src/test/compile-fail/asm-in-bad-modifier.rs index deff677ad03..ffbb25e266a 100644 --- a/src/test/compile-fail/asm-in-bad-modifier.rs +++ b/src/test/compile-fail/asm-in-bad-modifier.rs @@ -20,8 +20,8 @@ pub fn main() { let x: isize; let y: isize; unsafe { - asm!("mov $1, $0" : "=r"(x) : "=r"(5u)); //~ ERROR input operand constraint contains '=' - asm!("mov $1, $0" : "=r"(y) : "+r"(5u)); //~ ERROR input operand constraint contains '+' + asm!("mov $1, $0" : "=r"(x) : "=r"(5us)); //~ ERROR input operand constraint contains '=' + asm!("mov $1, $0" : "=r"(y) : "+r"(5us)); //~ ERROR input operand constraint contains '+' } foo(x); foo(y); diff --git a/src/test/compile-fail/asm-misplaced-option.rs b/src/test/compile-fail/asm-misplaced-option.rs index 42f3c1692c1..8bc6f206dec 100644 --- a/src/test/compile-fail/asm-misplaced-option.rs +++ b/src/test/compile-fail/asm-misplaced-option.rs @@ -21,14 +21,14 @@ pub fn main() { let mut x: isize = 0; unsafe { // extra colon - asm!("mov $1, $0" : "=r"(x) : "r"(5u), "0"(x) : : "cc"); + asm!("mov $1, $0" : "=r"(x) : "r"(5us), "0"(x) : : "cc"); //~^ WARNING unrecognized option } assert_eq!(x, 5); unsafe { // comma in place of a colon - asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8u) : "cc", "volatile"); + asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8us) : "cc", "volatile"); //~^ WARNING expected a clobber, found an option } assert_eq!(x, 13); diff --git a/src/test/compile-fail/asm-out-assign-imm.rs b/src/test/compile-fail/asm-out-assign-imm.rs index 031b1de91f2..9ad5d7e9f09 100644 --- a/src/test/compile-fail/asm-out-assign-imm.rs +++ b/src/test/compile-fail/asm-out-assign-imm.rs @@ -21,7 +21,7 @@ pub fn main() { x = 1; //~ NOTE prior assignment occurs here foo(x); unsafe { - asm!("mov $1, $0" : "=r"(x) : "r"(5u)); //~ ERROR re-assignment of immutable variable `x` + asm!("mov $1, $0" : "=r"(x) : "r"(5us)); //~ ERROR re-assignment of immutable variable `x` } foo(x); } diff --git a/src/test/compile-fail/asm-out-no-modifier.rs b/src/test/compile-fail/asm-out-no-modifier.rs index 76f60a34f3c..b58d41e1d82 100644 --- a/src/test/compile-fail/asm-out-no-modifier.rs +++ b/src/test/compile-fail/asm-out-no-modifier.rs @@ -19,7 +19,7 @@ fn foo(x: isize) { println!("{}", x); } pub fn main() { let x: isize; unsafe { - asm!("mov $1, $0" : "r"(x) : "r"(5u)); //~ ERROR output operand constraint lacks '=' + asm!("mov $1, $0" : "r"(x) : "r"(5us)); //~ ERROR output operand constraint lacks '=' } foo(x); } diff --git a/src/test/compile-fail/assign-to-method.rs b/src/test/compile-fail/assign-to-method.rs index 047e3325666..0694420e766 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 += 1u; } + pub fn speak(&self) { self.meows += 1us; } } 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(52u, 99); + let nyan : cat = cat(52us, 99); nyan.speak = |&:| println!("meow"); //~ ERROR attempted to take value of method } diff --git a/src/test/compile-fail/associated-types-eq-3.rs b/src/test/compile-fail/associated-types-eq-3.rs index 037f5037888..ed81c0fccbc 100644 --- a/src/test/compile-fail/associated-types-eq-3.rs +++ b/src/test/compile-fail/associated-types-eq-3.rs @@ -40,7 +40,7 @@ pub fn baz(x: &Foo<A=Bar>) { pub fn main() { - let a = 42i; + let a = 42is; foo1(a); //~ERROR expected usize, found struct Bar baz(&a); //~ERROR expected usize, found struct Bar } diff --git a/src/test/compile-fail/associated-types-incomplete-object.rs b/src/test/compile-fail/associated-types-incomplete-object.rs index 30923f09127..31492406fed 100644 --- a/src/test/compile-fail/associated-types-incomplete-object.rs +++ b/src/test/compile-fail/associated-types-incomplete-object.rs @@ -28,15 +28,15 @@ impl Foo for isize { } pub fn main() { - let a = &42i as &Foo<A=usize, B=char>; + let a = &42is as &Foo<A=usize, B=char>; - let b = &42i as &Foo<A=usize>; + let b = &42is as &Foo<A=usize>; //~^ ERROR the value of the associated type `B` (from the trait `Foo`) must be specified - let c = &42i as &Foo<B=char>; + let c = &42is as &Foo<B=char>; //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified - let d = &42i as &Foo; + let d = &42is as &Foo; //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified //~| ERROR the value of the associated type `B` (from the trait `Foo`) must be specified } diff --git a/src/test/compile-fail/bad-bang-ann-3.rs b/src/test/compile-fail/bad-bang-ann-3.rs index e364d0283c4..e5dbdbd237d 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 7u; //~ ERROR `return` in a function declared as diverging [E0166] + return 7us; //~ ERROR `return` in a function declared as diverging [E0166] } -fn main() { bad_bang(5u); } +fn main() { bad_bang(5us); } diff --git a/src/test/compile-fail/bad-bang-ann.rs b/src/test/compile-fail/bad-bang-ann.rs index 817b107d814..414421c8b77 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 < 0u { } else { panic!(); } + if i < 0us { } else { panic!(); } } -fn main() { bad_bang(5u); } +fn main() { bad_bang(5us); } diff --git a/src/test/compile-fail/bad-method-typaram-kind.rs b/src/test/compile-fail/bad-method-typaram-kind.rs index 636c881a3e1..8e5a6054b89 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>() { - 1u.bar::<T>(); //~ ERROR `core::marker::Send` is not implemented + 1us.bar::<T>(); //~ ERROR `core::marker::Send` is not implemented } trait bar { diff --git a/src/test/compile-fail/bang-tailexpr.rs b/src/test/compile-fail/bang-tailexpr.rs index ec576ff4bd8..d17fa68b47c 100644 --- a/src/test/compile-fail/bang-tailexpr.rs +++ b/src/test/compile-fail/bang-tailexpr.rs @@ -9,6 +9,6 @@ // except according to those terms. fn f() -> ! { //~ ERROR computation may converge in a function marked as diverging - 3i + 3is } fn main() { } diff --git a/src/test/compile-fail/borrow-immutable-upvar-mutation.rs b/src/test/compile-fail/borrow-immutable-upvar-mutation.rs index 228b07555f2..12555c55072 100644 --- a/src/test/compile-fail/borrow-immutable-upvar-mutation.rs +++ b/src/test/compile-fail/borrow-immutable-upvar-mutation.rs @@ -18,24 +18,24 @@ fn set(x: &mut usize) { *x = 5; } fn main() { // By-ref captures { - let mut x = 0u; + let mut x = 0us; let _f = |&:| x = 42; //~ ERROR cannot assign - let mut y = 0u; + let mut y = 0us; let _g = |&:| set(&mut y); //~ ERROR cannot borrow - let mut z = 0u; + let mut z = 0us; let _h = |&mut:| { set(&mut z); |&:| z = 42; }; //~ ERROR cannot assign } // By-value captures { - let mut x = 0u; + let mut x = 0us; let _f = move |&:| x = 42; //~ ERROR cannot assign - let mut y = 0u; + let mut y = 0us; let _g = move |&:| set(&mut y); //~ ERROR cannot borrow - let mut z = 0u; + let mut z = 0us; let _h = move |&mut:| { set(&mut z); move |&:| z = 42; }; //~ ERROR cannot assign } } diff --git a/src/test/compile-fail/borrow-tuple-fields.rs b/src/test/compile-fail/borrow-tuple-fields.rs index 63fd3c60e8c..e6fe60a9004 100644 --- a/src/test/compile-fail/borrow-tuple-fields.rs +++ b/src/test/compile-fail/borrow-tuple-fields.rs @@ -16,28 +16,28 @@ struct Foo(Box<isize>, isize); struct Bar(isize, isize); fn main() { - let x = (box 1i, 2i); + let x = (box 1is, 2is); let r = &x.0; let y = x; //~ ERROR cannot move out of `x` because it is borrowed - let mut x = (1i, 2i); + let mut x = (1is, 2is); let a = &x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as - let mut x = (1i, 2i); + let mut x = (1is, 2is); let a = &mut x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time - let x = Foo(box 1i, 2i); + let x = Foo(box 1is, 2is); let r = &x.0; let y = x; //~ ERROR cannot move out of `x` because it is borrowed - let mut x = Bar(1i, 2i); + let mut x = Bar(1is, 2is); let a = &x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as - let mut x = Bar(1i, 2i); + let mut x = Bar(1is, 2is); let a = &mut x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time } diff --git a/src/test/compile-fail/borrowck-anon-fields-tuple.rs b/src/test/compile-fail/borrowck-anon-fields-tuple.rs index 9a452ed18f6..88486756b66 100644 --- a/src/test/compile-fail/borrowck-anon-fields-tuple.rs +++ b/src/test/compile-fail/borrowck-anon-fields-tuple.rs @@ -12,7 +12,7 @@ // anonymous fields of a tuple vs the same anonymous field. fn distinct_variant() { - let mut y = (1i, 2i); + let mut y = (1is, 2is); let a = match y { (ref mut a, _) => a @@ -27,7 +27,7 @@ fn distinct_variant() { } fn same_variant() { - let mut y = (1i, 2i); + let mut y = (1is, 2is); let a = match y { (ref mut a, _) => a diff --git a/src/test/compile-fail/borrowck-array-double-move.rs b/src/test/compile-fail/borrowck-array-double-move.rs index ef2c629acfe..ac9ddc2ce65 100644 --- a/src/test/compile-fail/borrowck-array-double-move.rs +++ b/src/test/compile-fail/borrowck-array-double-move.rs @@ -12,9 +12,9 @@ #![feature(box_syntax)] fn f() { - let mut a = [box 0i, box 1i]; + let mut a = [box 0is, box 1is]; drop(a[0]); - a[1] = box 2i; + a[1] = box 2is; drop(a[0]); //~ ERROR use of moved value: `a[..]` } diff --git a/src/test/compile-fail/borrowck-break-uninit-2.rs b/src/test/compile-fail/borrowck-break-uninit-2.rs index 1ecf9f999b7..a52eaeeb9c3 100644 --- a/src/test/compile-fail/borrowck-break-uninit-2.rs +++ b/src/test/compile-fail/borrowck-break-uninit-2.rs @@ -11,14 +11,14 @@ fn foo() -> isize { let x: isize; - while 1i != 2 { + while 1is != 2 { break; x = 0; } println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` - return 17i; + return 17is; } fn main() { println!("{}", foo()); } diff --git a/src/test/compile-fail/borrowck-closures-mut-and-imm.rs b/src/test/compile-fail/borrowck-closures-mut-and-imm.rs index 14d57062660..29c7d6920bd 100644 --- a/src/test/compile-fail/borrowck-closures-mut-and-imm.rs +++ b/src/test/compile-fail/borrowck-closures-mut-and-imm.rs @@ -22,37 +22,37 @@ fn set(x: &mut isize) { } fn a() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| x = 4; let c2 = |&mut:| x * 5; //~ ERROR cannot borrow `x` } fn b() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| set(&mut x); let c2 = |&mut:| get(&x); //~ ERROR cannot borrow `x` } fn c() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| set(&mut x); let c2 = |&mut:| x * 5; //~ ERROR cannot borrow `x` } fn d() { - let mut x = 3i; + let mut x = 3is; let c2 = |&mut:| x * 5; x = 5; //~ ERROR cannot assign } fn e() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| get(&x); x = 5; //~ ERROR cannot assign } fn f() { - let mut x = box 3i; + let mut x = box 3is; let c1 = |&mut:| get(&*x); *x = 5; //~ ERROR cannot assign } diff --git a/src/test/compile-fail/borrowck-closures-two-mut.rs b/src/test/compile-fail/borrowck-closures-two-mut.rs index d442e3ac3f8..5cb49ab7711 100644 --- a/src/test/compile-fail/borrowck-closures-two-mut.rs +++ b/src/test/compile-fail/borrowck-closures-two-mut.rs @@ -15,7 +15,7 @@ #![feature(box_syntax)] fn a() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| x = 4; let c2 = |&mut:| x = 5; //~ ERROR cannot borrow `x` as mutable more than once } @@ -25,19 +25,19 @@ fn set(x: &mut isize) { } fn b() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| set(&mut x); let c2 = |&mut:| set(&mut x); //~ ERROR cannot borrow `x` as mutable more than once } fn c() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| x = 5; let c2 = |&mut:| set(&mut x); //~ ERROR cannot borrow `x` as mutable more than once } fn d() { - let mut x = 3i; + let mut x = 3is; let c1 = |&mut:| x = 5; let c2 = |&mut:| { let _y = |&mut:| set(&mut x); }; // (nested closure) //~^ ERROR cannot borrow `x` as mutable more than once diff --git a/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs b/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs index 17c69a40e58..6884ac153a1 100644 --- a/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs +++ b/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs @@ -17,7 +17,7 @@ struct Foo { } fn main() { - let mut y = 1i; + let mut y = 1is; let x = Some(&mut y); for &a in x.iter() { //~ ERROR cannot move out } @@ -28,7 +28,7 @@ fn main() { for &a in f.a.iter() { //~ ERROR cannot move out } - let x = Some(box 1i); + let x = Some(box 1is); for &a in x.iter() { //~ ERROR cannot move out } } diff --git a/src/test/compile-fail/borrowck-for-loop-head-linkage.rs b/src/test/compile-fail/borrowck-for-loop-head-linkage.rs index cb673f9be34..d2f99ea696a 100644 --- a/src/test/compile-fail/borrowck-for-loop-head-linkage.rs +++ b/src/test/compile-fail/borrowck-for-loop-head-linkage.rs @@ -11,11 +11,11 @@ use std::iter::repeat; fn main() { - let mut vector = vec![1u, 2]; + let mut vector = vec![1us, 2]; for &x in vector.iter() { let cap = vector.capacity(); vector.extend(repeat(0)); //~ ERROR cannot borrow - vector[1u] = 5u; //~ ERROR cannot borrow + vector[1us] = 5us; //~ ERROR cannot borrow } } diff --git a/src/test/compile-fail/borrowck-if-no-else.rs b/src/test/compile-fail/borrowck-if-no-else.rs index 08f91e729cd..b98833776fb 100644 --- a/src/test/compile-fail/borrowck-if-no-else.rs +++ b/src/test/compile-fail/borrowck-if-no-else.rs @@ -11,6 +11,6 @@ fn foo(x: isize) { println!("{}", x); } fn main() { - let x: isize; if 1i > 2 { x = 10; } + let x: isize; if 1is > 2 { x = 10; } foo(x); //~ ERROR use of possibly uninitialized variable: `x` } diff --git a/src/test/compile-fail/borrowck-if-with-else.rs b/src/test/compile-fail/borrowck-if-with-else.rs index 01e292ec89d..c74edfd8d07 100644 --- a/src/test/compile-fail/borrowck-if-with-else.rs +++ b/src/test/compile-fail/borrowck-if-with-else.rs @@ -12,7 +12,7 @@ fn foo(x: isize) { println!("{}", x); } fn main() { let x: isize; - if 1i > 2 { + if 1is > 2 { println!("whoops"); } else { x = 10; diff --git a/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs b/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs index d127e9345cd..fabfce6ffb3 100644 --- a/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs +++ b/src/test/compile-fail/borrowck-imm-ref-to-mut-rec-field-issue-3162-c.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let mut _a = 3i; + let mut _a = 3is; let _b = &mut _a; { let _c = &*_b; diff --git a/src/test/compile-fail/borrowck-issue-2657-1.rs b/src/test/compile-fail/borrowck-issue-2657-1.rs index fa80bf38cfe..dc1c73efc40 100644 --- a/src/test/compile-fail/borrowck-issue-2657-1.rs +++ b/src/test/compile-fail/borrowck-issue-2657-1.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = Some(box 1i); + let x = Some(box 1is); match x { Some(ref _y) => { let _a = x; //~ ERROR cannot move diff --git a/src/test/compile-fail/borrowck-issue-2657-2.rs b/src/test/compile-fail/borrowck-issue-2657-2.rs index f531b585dde..0b76044f8d6 100644 --- a/src/test/compile-fail/borrowck-issue-2657-2.rs +++ b/src/test/compile-fail/borrowck-issue-2657-2.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = Some(box 1i); + let x = Some(box 1is); match x { Some(ref y) => { let _b = *y; //~ ERROR cannot move out diff --git a/src/test/compile-fail/borrowck-lend-flow-loop.rs b/src/test/compile-fail/borrowck-lend-flow-loop.rs index 00dba3856a2..97f59789068 100644 --- a/src/test/compile-fail/borrowck-lend-flow-loop.rs +++ b/src/test/compile-fail/borrowck-lend-flow-loop.rs @@ -41,7 +41,7 @@ fn block_overarching_alias_mut() { let mut v = box 3; let mut x = &mut v; - for _ in range(0i, 3) { + for _ in range(0is, 3) { borrow(&*v); //~ ERROR cannot borrow } *x = box 5; diff --git a/src/test/compile-fail/borrowck-lend-flow-match.rs b/src/test/compile-fail/borrowck-lend-flow-match.rs index 0b40a78425f..f501682847f 100644 --- a/src/test/compile-fail/borrowck-lend-flow-match.rs +++ b/src/test/compile-fail/borrowck-lend-flow-match.rs @@ -19,10 +19,10 @@ fn separate_arms() { None => { // It is ok to reassign x here, because there is in // fact no outstanding loan of x! - x = Some(0i); + x = Some(0is); } Some(ref _i) => { - x = Some(1i); //~ ERROR cannot assign + x = Some(1is); //~ ERROR cannot assign } } x.clone(); // just to prevent liveness warnings diff --git a/src/test/compile-fail/borrowck-let-suggestion.rs b/src/test/compile-fail/borrowck-let-suggestion.rs index cd1101c05d1..5f5ff4014e1 100644 --- a/src/test/compile-fail/borrowck-let-suggestion.rs +++ b/src/test/compile-fail/borrowck-let-suggestion.rs @@ -9,7 +9,7 @@ // except according to those terms. fn f() { - let x = [1i].iter(); //~ ERROR borrowed value does not live long enough + let x = [1is].iter(); //~ ERROR borrowed value does not live long enough //~^^ NOTE reference must be valid for the block //~^^ HELP consider using a `let` binding to increase its lifetime } diff --git a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs index 8906e2d42b2..bff22257760 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs @@ -17,7 +17,7 @@ fn borrow<F>(v: &isize, f: F) where F: FnOnce(&isize) { } fn box_imm() { - let v = box 3i; + let v = box 3is; let _w = &v; Thread::spawn(move|| { println!("v={}", *v); @@ -26,7 +26,7 @@ fn box_imm() { } fn box_imm_explicit() { - let v = box 3i; + let v = box 3is; let _w = &v; Thread::spawn(move|| { println!("v={}", *v); diff --git a/src/test/compile-fail/borrowck-match-binding-is-assignment.rs b/src/test/compile-fail/borrowck-match-binding-is-assignment.rs index 819ff73a580..575d67c0b83 100644 --- a/src/test/compile-fail/borrowck-match-binding-is-assignment.rs +++ b/src/test/compile-fail/borrowck-match-binding-is-assignment.rs @@ -19,7 +19,7 @@ struct S { } pub fn main() { - match 1i { + match 1is { x => { x += 1; //~ ERROR re-assignment of immutable variable `x` } @@ -37,13 +37,13 @@ pub fn main() { } } - match (1i,) { + match (1is,) { (x,) => { x += 1; //~ ERROR re-assignment of immutable variable `x` } } - match [1i,2,3] { + match [1is,2,3] { [x,_,_] => { x += 1; //~ ERROR re-assignment of immutable variable `x` } diff --git a/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs b/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs index 936092df42e..0d1a51bbf35 100644 --- a/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs +++ b/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs @@ -14,7 +14,7 @@ #![feature(box_syntax)] fn main() { - let a = box box 2i; + let a = box box 2is; let b = &a; let z = *a; //~ ERROR: cannot move out of `*a` because it is borrowed diff --git a/src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs b/src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs index a6723a04611..ebe06fb4a22 100644 --- a/src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs +++ b/src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs @@ -11,6 +11,6 @@ use std::rc::Rc; pub fn main() { - let _x = Rc::new(vec!(1i, 2)).into_iter(); + let _x = Rc::new(vec!(1is, 2)).into_iter(); //~^ ERROR cannot move out of dereference of `&`-pointer } diff --git a/src/test/compile-fail/borrowck-multiple-captures.rs b/src/test/compile-fail/borrowck-multiple-captures.rs index e90d25c781b..33ac5d7fceb 100644 --- a/src/test/compile-fail/borrowck-multiple-captures.rs +++ b/src/test/compile-fail/borrowck-multiple-captures.rs @@ -15,9 +15,9 @@ use std::thread::Thread; fn borrow<T>(_: &T) { } fn different_vars_after_borrows() { - let x1 = box 1i; + let x1 = box 1is; let p1 = &x1; - let x2 = box 2i; + let x2 = box 2is; let p2 = &x2; Thread::spawn(move|| { drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed @@ -28,9 +28,9 @@ fn different_vars_after_borrows() { } fn different_vars_after_moves() { - let x1 = box 1i; + let x1 = box 1is; drop(x1); - let x2 = box 2i; + let x2 = box 2is; drop(x2); Thread::spawn(move|| { drop(x1); //~ ERROR capture of moved value: `x1` @@ -39,7 +39,7 @@ fn different_vars_after_moves() { } fn same_var_after_borrow() { - let x = box 1i; + let x = box 1is; let p = &x; Thread::spawn(move|| { drop(x); //~ ERROR cannot move `x` into closure because it is borrowed @@ -49,7 +49,7 @@ fn same_var_after_borrow() { } fn same_var_after_move() { - let x = box 1i; + let x = box 1is; drop(x); Thread::spawn(move|| { drop(x); //~ ERROR capture of moved value: `x` diff --git a/src/test/compile-fail/borrowck-overloaded-index-2.rs b/src/test/compile-fail/borrowck-overloaded-index-2.rs index bfdd46345de..074c448a0ec 100644 --- a/src/test/compile-fail/borrowck-overloaded-index-2.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-2.rs @@ -25,7 +25,7 @@ impl<T> Index<usize> for MyVec<T> { } fn main() { - let v = MyVec { data: vec!(box 1i, box 2, box 3) }; + let v = MyVec { data: vec!(box 1is, box 2, box 3) }; let good = &v[0]; // Shouldn't fail here let bad = v[0]; //~^ ERROR cannot move out of dereference (dereference is implicit, due to indexing) 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 0a47353683c..c3a1e808e37 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 = 1u; + let mut x = 1us; 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 = 1u; + let mut x = 1us; 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 = 1u; + let mut x = 1us; let y = &mut x; let z = &mut x; //~ ERROR cannot borrow }; diff --git a/src/test/compile-fail/borrowck-uniq-via-lend.rs b/src/test/compile-fail/borrowck-uniq-via-lend.rs index 9c14a699032..7fadf6d4660 100644 --- a/src/test/compile-fail/borrowck-uniq-via-lend.rs +++ b/src/test/compile-fail/borrowck-uniq-via-lend.rs @@ -13,7 +13,7 @@ fn borrow(_v: &isize) {} fn local() { - let mut v = box 3i; + let mut v = box 3is; borrow(&*v); } @@ -32,27 +32,27 @@ fn local_recs() { } fn aliased_imm() { - let mut v = box 3i; + let mut v = box 3is; let _w = &v; borrow(&*v); } fn aliased_mut() { - let mut v = box 3i; + let mut v = box 3is; let _w = &mut v; borrow(&*v); //~ ERROR cannot borrow `*v` } fn aliased_other() { - let mut v = box 3i; - let mut w = box 4i; + let mut v = box 3is; + let mut w = box 4is; let _x = &mut w; borrow(&*v); } fn aliased_other_reassign() { - let mut v = box 3i; - let mut w = box 4i; + let mut v = box 3is; + let mut w = box 4is; let mut _x = &mut w; _x = &mut v; borrow(&*v); //~ ERROR cannot borrow `*v` diff --git a/src/test/compile-fail/borrowck-vec-pattern-move-tail.rs b/src/test/compile-fail/borrowck-vec-pattern-move-tail.rs index cb8762f44fb..8869e99efd5 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-move-tail.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-move-tail.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let mut a = [1i, 2, 3, 4]; + let mut a = [1is, 2, 3, 4]; let t = match a { [1, 2, tail..] => tail, _ => unreachable!() diff --git a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs index 98a511f0900..49994ebdbba 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs @@ -12,7 +12,7 @@ #![feature(box_syntax)] fn a() { - let mut vec = [box 1i, box 2, box 3]; + let mut vec = [box 1is, box 2, box 3]; match vec { [box ref _a, _, _] => { vec[0] = box 4; //~ ERROR cannot assign @@ -21,7 +21,7 @@ fn a() { } fn b() { - let mut vec = vec!(box 1i, box 2, box 3); + let mut vec = vec!(box 1is, box 2, box 3); let vec: &mut [Box<isize>] = vec.as_mut_slice(); match vec { [_b..] => { @@ -31,7 +31,7 @@ fn b() { } fn c() { - let mut vec = vec!(box 1i, box 2, box 3); + let mut vec = vec!(box 1is, box 2, box 3); let vec: &mut [Box<isize>] = vec.as_mut_slice(); match vec { [_a, //~ ERROR cannot move out @@ -49,7 +49,7 @@ fn c() { } fn d() { - let mut vec = vec!(box 1i, box 2, box 3); + let mut vec = vec!(box 1is, box 2, box 3); let vec: &mut [Box<isize>] = vec.as_mut_slice(); match vec { [_a.., //~ ERROR cannot move out @@ -60,7 +60,7 @@ fn d() { } fn e() { - let mut vec = vec!(box 1i, box 2, box 3); + let mut vec = vec!(box 1is, box 2, box 3); let vec: &mut [Box<isize>] = vec.as_mut_slice(); match vec { [_a, _b, _c] => {} //~ ERROR cannot move out diff --git a/src/test/compile-fail/borrowck-while-break.rs b/src/test/compile-fail/borrowck-while-break.rs index 15a70b2444d..4752120d691 100644 --- a/src/test/compile-fail/borrowck-while-break.rs +++ b/src/test/compile-fail/borrowck-while-break.rs @@ -11,7 +11,7 @@ fn test(cond: bool) { let v; while cond { - v = 3i; + v = 3is; break; } println!("{}", v); //~ ERROR use of possibly uninitialized variable: `v` diff --git a/src/test/compile-fail/borrowck-while.rs b/src/test/compile-fail/borrowck-while.rs index 17eb19a44e6..f163cf602bf 100644 --- a/src/test/compile-fail/borrowck-while.rs +++ b/src/test/compile-fail/borrowck-while.rs @@ -10,7 +10,7 @@ fn f() -> isize { let mut x: isize; - while 1i == 1 { x = 10; } + while 1is == 1 { x = 10; } return x; //~ ERROR use of possibly uninitialized variable: `x` } diff --git a/src/test/compile-fail/builtin-superkinds-self-type.rs b/src/test/compile-fail/builtin-superkinds-self-type.rs index 9826a5a0126..0ec4f3dce11 100644 --- a/src/test/compile-fail/builtin-superkinds-self-type.rs +++ b/src/test/compile-fail/builtin-superkinds-self-type.rs @@ -22,6 +22,6 @@ impl <T: Sync> Foo for T { } fn main() { let (tx, rx) = channel(); - 1193182i.foo(tx); - assert!(rx.recv() == 1193182i); + 1193182is.foo(tx); + assert!(rx.recv() == 1193182is); } diff --git a/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs b/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs index 143e78e5d9f..9148f13c4dd 100644 --- a/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs +++ b/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let x = 1i; + let x = 1is; move|:| { x = 2; }; //~^ ERROR: cannot assign to immutable captured outer variable diff --git a/src/test/compile-fail/class-implements-bad-trait.rs b/src/test/compile-fail/class-implements-bad-trait.rs index 8d573806308..d709ffdc3fc 100644 --- a/src/test/compile-fail/class-implements-bad-trait.rs +++ b/src/test/compile-fail/class-implements-bad-trait.rs @@ -15,5 +15,5 @@ class cat : nonexistent { } fn main() { - let nyan = cat(0u); + let nyan = cat(0us); } diff --git a/src/test/compile-fail/class-method-missing.rs b/src/test/compile-fail/class-method-missing.rs index 56b3caf6d21..3b921e07279 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(0u); + let nyan = cat(0us); } diff --git a/src/test/compile-fail/class-missing-self.rs b/src/test/compile-fail/class-missing-self.rs index af172cd4924..4d8e4bca784 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 += 1u; //~ ERROR unresolved name + meows += 1us; //~ 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 053efe3b41b..62e8fccbda0 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. -static A: usize = { 1u; 2 }; +static A: usize = { 1us; 2 }; //~^ ERROR: blocks in constants are limited to items and tail expressions static B: usize = { { } 2 }; @@ -19,7 +19,7 @@ macro_rules! foo { } static C: usize = { foo!(); 2 }; -static D: usize = { let x = 4u; 2 }; +static D: usize = { let x = 4us; 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 324f189bbfb..6015652668e 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 = 0u; +static s: usize = 0us; #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums -const c: usize = 0u; +const c: usize = 0us; #[derive(PartialEq)] //~ ERROR: `derive` may only be applied to structs and enums mod m { } diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs index 89062576a50..5166ef8f72f 100644 --- a/src/test/compile-fail/destructure-trait-ref.rs +++ b/src/test/compile-fail/destructure-trait-ref.rs @@ -27,17 +27,17 @@ fn main() { // if n > m, it's a type mismatch error. // n < m - let &x = &(&1i as &T); - let &x = &&(&1i as &T); - let &&x = &&(&1i as &T); + let &x = &(&1is as &T); + let &x = &&(&1is as &T); + let &&x = &&(&1is as &T); // n == m - let &x = &1i as &T; //~ ERROR type `&T` cannot be dereferenced - let &&x = &(&1i as &T); //~ ERROR type `&T` cannot be dereferenced - let box x = box 1i as Box<T>; //~ ERROR type `Box<T>` cannot be dereferenced + let &x = &1is as &T; //~ ERROR type `&T` cannot be dereferenced + let &&x = &(&1is as &T); //~ ERROR type `&T` cannot be dereferenced + let box x = box 1is as Box<T>; //~ ERROR type `Box<T>` cannot be dereferenced // n > m - let &&x = &1i as &T; //~ ERROR found &-ptr - let &&&x = &(&1i as &T); //~ ERROR found &-ptr - let box box x = box 1i as Box<T>; //~ ERROR found box + let &&x = &1is as &T; //~ ERROR found &-ptr + let &&&x = &(&1is as &T); //~ ERROR found &-ptr + let box box x = box 1is as Box<T>; //~ ERROR found box } diff --git a/src/test/compile-fail/dst-bad-deep.rs b/src/test/compile-fail/dst-bad-deep.rs index 354898f6cf0..032835d9460 100644 --- a/src/test/compile-fail/dst-bad-deep.rs +++ b/src/test/compile-fail/dst-bad-deep.rs @@ -18,7 +18,7 @@ struct Fat<T: ?Sized> { } pub fn main() { - let f: Fat<[isize; 3]> = Fat { ptr: [5i, 6, 7] }; + let f: Fat<[isize; 3]> = Fat { ptr: [5is, 6, 7] }; let g: &Fat<[isize]> = &f; let h: &Fat<Fat<[isize]>> = &Fat { ptr: *g }; //~^ ERROR the trait `core::marker::Sized` is not implemented diff --git a/src/test/compile-fail/feature-gate-advanced-slice-features.rs b/src/test/compile-fail/feature-gate-advanced-slice-features.rs index 97d593d310e..a37a8a326a6 100644 --- a/src/test/compile-fail/feature-gate-advanced-slice-features.rs +++ b/src/test/compile-fail/feature-gate-advanced-slice-features.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let x = [ 1i, 2, 3, 4, 5 ]; + let x = [ 1is, 2, 3, 4, 5 ]; match x { [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches diff --git a/src/test/compile-fail/feature-gate-int-uint.rs b/src/test/compile-fail/feature-gate-int-uint.rs index 0c730b5f593..94190cc1511 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: usize //~ WARN the `usize` type is deprecated } fn bar(x: usize) { //~ WARN the `usize` type is deprecated - 1u; //~ WARN the `u` suffix on integers is deprecated + 1us; //~ WARN the `u` suffix on integers is deprecated } } mod i { @@ -25,7 +25,7 @@ mod i { x: isize //~ WARN the `isize` type is deprecated } fn bar(x: isize) { //~ WARN the `isize` type is deprecated - 1i; //~ WARN the `u` suffix on integers is deprecated + 1is; //~ WARN the `u` suffix on integers is deprecated } } diff --git a/src/test/compile-fail/fn-trait-formatting.rs b/src/test/compile-fail/fn-trait-formatting.rs index 723192952f2..3f5a92605b7 100644 --- a/src/test/compile-fail/fn-trait-formatting.rs +++ b/src/test/compile-fail/fn-trait-formatting.rs @@ -21,5 +21,5 @@ fn main() { let _: () = (box |&mut:| -> isize unimplemented!()) as Box<FnMut() -> isize>; //~^ ERROR Box<core::ops::FnMut() -> isize> - needs_fn(1i); //~ ERROR `core::ops::Fn(isize) -> isize` + needs_fn(1is); //~ ERROR `core::ops::Fn(isize) -> isize` } diff --git a/src/test/compile-fail/for-loop-refutable-pattern-error-message.rs b/src/test/compile-fail/for-loop-refutable-pattern-error-message.rs index 8de613ac03d..c381fcf3efb 100644 --- a/src/test/compile-fail/for-loop-refutable-pattern-error-message.rs +++ b/src/test/compile-fail/for-loop-refutable-pattern-error-message.rs @@ -11,6 +11,6 @@ fn main() { for - &1i //~ ERROR refutable pattern in `for` loop binding - in [1i].iter() {} + &1is //~ ERROR refutable pattern in `for` loop binding + in [1is].iter() {} } diff --git a/src/test/compile-fail/hashmap-iter-value-lifetime.rs b/src/test/compile-fail/hashmap-iter-value-lifetime.rs index d9d7705fef6..db1e1e8efe4 100644 --- a/src/test/compile-fail/hashmap-iter-value-lifetime.rs +++ b/src/test/compile-fail/hashmap-iter-value-lifetime.rs @@ -10,7 +10,7 @@ fn main() { let mut my_stuff = std::collections::HashMap::new(); - my_stuff.insert(0i, 42i); + my_stuff.insert(0is, 42is); let (_, thing) = my_stuff.iter().next().unwrap(); diff --git a/src/test/compile-fail/hashmap-lifetimes.rs b/src/test/compile-fail/hashmap-lifetimes.rs index edd57477d76..40673dd92b8 100644 --- a/src/test/compile-fail/hashmap-lifetimes.rs +++ b/src/test/compile-fail/hashmap-lifetimes.rs @@ -10,7 +10,7 @@ fn main() { let mut my_stuff = std::collections::HashMap::new(); - my_stuff.insert(0i, 42i); + my_stuff.insert(0is, 42is); let mut it = my_stuff.iter(); my_stuff.insert(1, 43); //~ ERROR cannot borrow diff --git a/src/test/compile-fail/if-let.rs b/src/test/compile-fail/if-let.rs index 971f643c0fe..d83779c4f0f 100644 --- a/src/test/compile-fail/if-let.rs +++ b/src/test/compile-fail/if-let.rs @@ -20,20 +20,20 @@ fn macros() { }} } - foo!(a, 1i, { //~ ERROR irrefutable if-let + foo!(a, 1is, { //~ ERROR irrefutable if-let println!("irrefutable pattern"); }); - bar!(a, 1i, { //~ ERROR irrefutable if-let + bar!(a, 1is, { //~ ERROR irrefutable if-let println!("irrefutable pattern"); }); } pub fn main() { - if let a = 1i { //~ ERROR irrefutable if-let + if let a = 1is { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } - if let a = 1i { //~ ERROR irrefutable if-let + if let a = 1is { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } else if true { println!("else-if in irrefutable if-let"); @@ -41,15 +41,15 @@ pub fn main() { println!("else in irrefutable if-let"); } - if let 1i = 2i { + if let 1is = 2is { println!("refutable pattern"); - } else if let a = 1i { //~ ERROR irrefutable if-let + } else if let a = 1is { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } if true { println!("if"); - } else if let a = 1i { //~ ERROR irrefutable if-let + } else if let a = 1is { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } } diff --git a/src/test/compile-fail/implicit-method-bind.rs b/src/test/compile-fail/implicit-method-bind.rs index 34367f06793..d329f72f788 100644 --- a/src/test/compile-fail/implicit-method-bind.rs +++ b/src/test/compile-fail/implicit-method-bind.rs @@ -11,5 +11,5 @@ use std::num::SignedInt; fn main() { - let _f = 10i.abs; //~ ERROR attempted to take value of method + let _f = 10is.abs; //~ ERROR attempted to take value of method } diff --git a/src/test/compile-fail/import-glob-circular.rs b/src/test/compile-fail/import-glob-circular.rs index 37c2d2ffdc5..0f6e3dc134d 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 0u; } + pub fn common() -> usize { return 0us; } } mod circ2 { pub use circ1::f1; pub fn f2() { println!("f2"); } - pub fn common() -> usize { return 1u; } + pub fn common() -> usize { return 1us; } } mod test { diff --git a/src/test/compile-fail/index-bot.rs b/src/test/compile-fail/index-bot.rs index bd01d45fd44..876c1e481f6 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)[0u]; //~ ERROR the type of this value must be known in this context + (return)[0us]; //~ 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 514557a96a4..a922f5fe452 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 > 0u { - function(counter - 1u, t.to_option()); + if counter > 0us { + function(counter - 1us, t.to_option()); } } fn main() { - function(22u, 22u); + function(22us, 22us); } diff --git a/src/test/compile-fail/integral-indexing.rs b/src/test/compile-fail/integral-indexing.rs index 08a8f72a668..ef651dd9ce7 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.as_slice()[3u]; + v.as_slice()[3us]; v.as_slice()[3]; v.as_slice()[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.as_slice()[3i32]; //~ERROR the trait `core::ops::Index<i32>` is not implemented //~^ ERROR the trait `core::ops::Index<i32>` is not implemented - s.as_bytes()[3u]; + s.as_bytes()[3us]; 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-10398.rs b/src/test/compile-fail/issue-10398.rs index 11c577f9dc3..c1102bc84ab 100644 --- a/src/test/compile-fail/issue-10398.rs +++ b/src/test/compile-fail/issue-10398.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = box 1i; + let x = box 1is; let f = move|:| { let _a = x; drop(x); diff --git a/src/test/compile-fail/issue-11493.rs b/src/test/compile-fail/issue-11493.rs index 7856a5dcf7f..895eb4cf96f 100644 --- a/src/test/compile-fail/issue-11493.rs +++ b/src/test/compile-fail/issue-11493.rs @@ -11,6 +11,6 @@ // This file must never have a trailing newline fn main() { - let x = Some(3i); - let y = x.as_ref().unwrap_or(&5i); //~ ERROR: borrowed value does not live long enough + let x = Some(3is); + let y = x.as_ref().unwrap_or(&5is); //~ ERROR: borrowed value does not live long enough } diff --git a/src/test/compile-fail/issue-11714.rs b/src/test/compile-fail/issue-11714.rs index dd3fad978eb..eef035d3d94 100644 --- a/src/test/compile-fail/issue-11714.rs +++ b/src/test/compile-fail/issue-11714.rs @@ -9,7 +9,7 @@ // except according to those terms. fn blah() -> isize { //~ ERROR not all control paths return a value - 1i + 1is ; //~ HELP consider removing this semicolon: } diff --git a/src/test/compile-fail/issue-11873.rs b/src/test/compile-fail/issue-11873.rs index 89667937531..67578de8922 100644 --- a/src/test/compile-fail/issue-11873.rs +++ b/src/test/compile-fail/issue-11873.rs @@ -9,8 +9,8 @@ // except according to those terms. fn main() { - let mut v = vec!(1i); - let mut f = |&mut:| v.push(2i); + let mut v = vec!(1is); + let mut f = |&mut:| v.push(2is); let _w = v; //~ ERROR: cannot move out of `v` f(); diff --git a/src/test/compile-fail/issue-11925.rs b/src/test/compile-fail/issue-11925.rs index 71e4598d635..e5f3b7d62d3 100644 --- a/src/test/compile-fail/issue-11925.rs +++ b/src/test/compile-fail/issue-11925.rs @@ -12,7 +12,7 @@ fn main() { let r = { - let x = box 42i; + let x = box 42is; let f = move|:| &x; //~ ERROR: `x` does not live long enough f() }; diff --git a/src/test/compile-fail/issue-12041.rs b/src/test/compile-fail/issue-12041.rs index 094f6d64edc..02c19204f79 100644 --- a/src/test/compile-fail/issue-12041.rs +++ b/src/test/compile-fail/issue-12041.rs @@ -17,7 +17,7 @@ fn main() { loop { let tx = tx; //~^ ERROR: use of moved value: `tx` - tx.send(1i); + tx.send(1is); } }); } diff --git a/src/test/compile-fail/issue-13058.rs b/src/test/compile-fail/issue-13058.rs index 8f507864052..eee82483cae 100644 --- a/src/test/compile-fail/issue-13058.rs +++ b/src/test/compile-fail/issue-13058.rs @@ -34,6 +34,6 @@ fn check<'r, I: Iterator<Item=usize>, T: Itble<'r, usize, I>>(cont: &T) -> bool } fn main() { - check((3u, 5u)); + check((3us, 5us)); //~^ ERROR mismatched types: expected `&_`, found `(usize, usize)` (expected &-ptr, found tuple) } diff --git a/src/test/compile-fail/issue-13482-2.rs b/src/test/compile-fail/issue-13482-2.rs index ef7d3d4d158..5c9b0473cea 100644 --- a/src/test/compile-fail/issue-13482-2.rs +++ b/src/test/compile-fail/issue-13482-2.rs @@ -14,7 +14,7 @@ fn main() { let x = [1,2]; let y = match x { [] => None, - //~^ ERROR types: expected `[_#0i; 2]`, found `[_#7t; 0]` + //~^ ERROR types: expected `[_#0is; 2]`, found `[_#7t; 0]` // (expected array of 2 elements, found array of 0 elements) [a,_] => Some(a) }; diff --git a/src/test/compile-fail/issue-1362.rs b/src/test/compile-fail/issue-1362.rs index 64c503376d5..28d16f9c0b7 100644 --- a/src/test/compile-fail/issue-1362.rs +++ b/src/test/compile-fail/issue-1362.rs @@ -11,7 +11,7 @@ // Regression test for issue #1362 - without that fix the span will be bogus // no-reformat fn main() { - let x: usize = 20i; //~ ERROR mismatched types + let x: usize = 20is; //~ ERROR mismatched types } // NOTE: Do not add any extra lines as the line number the error is // on is significant; an error later in the source file might not diff --git a/src/test/compile-fail/issue-1448-2.rs b/src/test/compile-fail/issue-1448-2.rs index 72803ea9ad1..371adf931b0 100644 --- a/src/test/compile-fail/issue-1448-2.rs +++ b/src/test/compile-fail/issue-1448-2.rs @@ -13,5 +13,5 @@ fn foo(a: usize) -> usize { a } fn main() { - println!("{}", foo(10i)); //~ ERROR mismatched types + println!("{}", foo(10is)); //~ ERROR mismatched types } diff --git a/src/test/compile-fail/issue-15094.rs b/src/test/compile-fail/issue-15094.rs index 5292848f8ee..5b33069b595 100644 --- a/src/test/compile-fail/issue-15094.rs +++ b/src/test/compile-fail/issue-15094.rs @@ -28,6 +28,6 @@ fn make_shower<T>(x: T) -> Shower<T> { } pub fn main() { - let show3 = make_shower(3i); + let show3 = make_shower(3is); show3(); } diff --git a/src/test/compile-fail/issue-15167.rs b/src/test/compile-fail/issue-15167.rs index d4de4e177f0..630c35d6a4f 100644 --- a/src/test/compile-fail/issue-15167.rs +++ b/src/test/compile-fail/issue-15167.rs @@ -18,7 +18,7 @@ macro_rules! f { () => (n) } fn main() -> (){ - for n in range(0i, 1) { + for n in range(0is, 1) { println!("{}", f!()); //~ ERROR unresolved name `n` } } diff --git a/src/test/compile-fail/issue-15480.rs b/src/test/compile-fail/issue-15480.rs index abcc2eb1f98..59d87b5277a 100644 --- a/src/test/compile-fail/issue-15480.rs +++ b/src/test/compile-fail/issue-15480.rs @@ -10,7 +10,7 @@ fn main() { let v = vec![ - &3i + &3is //~^ ERROR borrowed value does not live long enough ]; diff --git a/src/test/compile-fail/issue-17283.rs b/src/test/compile-fail/issue-17283.rs index 9f76feeaf04..0c9fd9d9486 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 = 1u; + let x = 1us; let y: Foo; // `x { ... }` should not be interpreted as a struct literal here diff --git a/src/test/compile-fail/issue-17385.rs b/src/test/compile-fail/issue-17385.rs index e7cab292ea7..38278c524c8 100644 --- a/src/test/compile-fail/issue-17385.rs +++ b/src/test/compile-fail/issue-17385.rs @@ -23,10 +23,10 @@ impl Drop for Enum { } fn main() { - let foo = X(1i); + let foo = X(1is); drop(foo); match foo { //~ ERROR use of moved value - X(1i) => (), + X(1is) => (), _ => unreachable!() } diff --git a/src/test/compile-fail/issue-17405.rs b/src/test/compile-fail/issue-17405.rs index cb541835fbb..63120e85b09 100644 --- a/src/test/compile-fail/issue-17405.rs +++ b/src/test/compile-fail/issue-17405.rs @@ -13,7 +13,7 @@ enum Foo { } fn main() { - match Foo::Bar(1i) { + match Foo::Bar(1is) { Foo { i } => () //~ ERROR `Foo` does not name a struct or a struct variant } } diff --git a/src/test/compile-fail/issue-17441.rs b/src/test/compile-fail/issue-17441.rs index a28162159a5..e9e69dadd3b 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 = &[1u, 2] as [usize]; + let _foo = &[1us, 2] as [usize]; //~^ ERROR cast to unsized type: `&[usize; 2]` as `[usize]` //~^^ HELP consider using an implicit coercion to `&[usize]` instead - let _bar = box 1u as std::fmt::Show; + let _bar = box 1us 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 = 1u as std::fmt::Show; + let _baz = 1us 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 = [1u, 2] as [usize]; + let _quux = [1us, 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-17718-patterns.rs b/src/test/compile-fail/issue-17718-patterns.rs index ab95606da44..6c4d0874703 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 1u { + match 1us { 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-17800.rs b/src/test/compile-fail/issue-17800.rs index 9590ef3dab4..89611e4f3fe 100644 --- a/src/test/compile-fail/issue-17800.rs +++ b/src/test/compile-fail/issue-17800.rs @@ -14,8 +14,8 @@ enum MyOption<T> { } fn main() { - match MyOption::MySome(42i) { - MyOption::MySome { x: 42i } => (), + match MyOption::MySome(42is) { + MyOption::MySome { x: 42is } => (), //~^ ERROR `MyOption::MySome` does not name a struct or a struct variant _ => (), } diff --git a/src/test/compile-fail/issue-17913.rs b/src/test/compile-fail/issue-17913.rs index e2dbad56f84..56cd544b3c6 100644 --- a/src/test/compile-fail/issue-17913.rs +++ b/src/test/compile-fail/issue-17913.rs @@ -15,14 +15,14 @@ #[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))] fn main() { - let n = 0u; - let a = box [&n; 0xF000000000000000u]; + let n = 0us; + let a = box [&n; 0xF000000000000000us]; println!("{}", a[0xFFFFFFu]); } #[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))] fn main() { - let n = 0u; + let n = 0us; let a = box [&n; 0xFFFFFFFFu]; println!("{}", a[0xFFFFFFu]); } diff --git a/src/test/compile-fail/issue-17933.rs b/src/test/compile-fail/issue-17933.rs index 1a490245cfc..47f8d75250d 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 = 1u; +pub static X: usize = 1us; fn main() { - match 1u { + match 1us { self::X => { }, //~^ ERROR static variables cannot be referenced in a pattern, use a `const` instead _ => { }, diff --git a/src/test/compile-fail/issue-17999.rs b/src/test/compile-fail/issue-17999.rs index e3ad2dd1b06..5726960f66a 100644 --- a/src/test/compile-fail/issue-17999.rs +++ b/src/test/compile-fail/issue-17999.rs @@ -11,7 +11,7 @@ #![deny(unused_variables)] fn main() { - for _ in range(1i, 101) { + for _ in range(1is, 101) { let x = (); //~ ERROR: unused variable: `x` match () { a => {} //~ ERROR: unused variable: `a` diff --git a/src/test/compile-fail/issue-18107.rs b/src/test/compile-fail/issue-18107.rs index b8249ebd479..83427e8aa67 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 0u { + match 0us { _ => unimplemented!() } } diff --git a/src/test/compile-fail/issue-18252.rs b/src/test/compile-fail/issue-18252.rs index dd9626f74ec..822c86d1d3e 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(42u); //~ ERROR uses it like a function + let f = Foo::Variant(42us); //~ 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 17dc59dbc8d..85dda340d19 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 1u; + let s = &mut 1us; 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 657ef85233d..bed835d9bde 100644 --- a/src/test/compile-fail/issue-18783.rs +++ b/src/test/compile-fail/issue-18783.rs @@ -14,7 +14,7 @@ use std::cell::RefCell; fn main() { let c = RefCell::new(vec![]); - let mut y = 1u; + let mut y = 1us; c.push(box || y = 0); c.push(box || y = 0); //~^ ERROR cannot borrow `y` as mutable more than once at a time @@ -22,7 +22,7 @@ fn main() { fn ufcs() { let c = RefCell::new(vec![]); - let mut y = 1u; + let mut y = 1us; Push::push(&c, box || y = 0); 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 7aba1bc8e65..e174fb9b7ad 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(&0u) } +#[inline(never)] fn foo(b: &Bar) { b.foo(&0us) } fn main() { let mut thing = Thing; diff --git a/src/test/compile-fail/issue-19096.rs b/src/test/compile-fail/issue-19096.rs index 1e68de1f923..7bc79463d3a 100644 --- a/src/test/compile-fail/issue-19096.rs +++ b/src/test/compile-fail/issue-19096.rs @@ -9,6 +9,6 @@ // except according to those terms. fn main() { - let t = (42i, 42i); + let t = (42is, 42is); t.0::<isize>; //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `::` } diff --git a/src/test/compile-fail/issue-1962.rs b/src/test/compile-fail/issue-1962.rs index c59ee328eff..44abfca1653 100644 --- a/src/test/compile-fail/issue-1962.rs +++ b/src/test/compile-fail/issue-1962.rs @@ -10,9 +10,9 @@ // compile-flags: -D while-true fn main() { - let mut i = 0i; + let mut i = 0is; while true { //~ ERROR denote infinite loops with loop - i += 1i; - if i == 5i { break; } + i += 1is; + if i == 5is { break; } } } diff --git a/src/test/compile-fail/issue-2150.rs b/src/test/compile-fail/issue-2150.rs index 5ebc445bace..f18db94acf3 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.iter() { i += 1u; } + for x in v.iter() { i += 1us; } //~^ ERROR: unreachable statement return i; } diff --git a/src/test/compile-fail/issue-3707.rs b/src/test/compile-fail/issue-3707.rs index ad818cf9f83..0aa357f2398 100644 --- a/src/test/compile-fail/issue-3707.rs +++ b/src/test/compile-fail/issue-3707.rs @@ -14,7 +14,7 @@ struct Obj { impl Obj { pub fn boom() -> bool { - return 1i+1 == 2 + return 1is+1 == 2 } pub fn chirp(&self) { self.boom(); //~ ERROR `&Obj` does not implement any method in scope named `boom` @@ -24,5 +24,5 @@ impl Obj { fn main() { let o = Obj { member: 0 }; o.chirp(); - 1i + 1; + 1is + 1; } diff --git a/src/test/compile-fail/issue-4335.rs b/src/test/compile-fail/issue-4335.rs index f35332a2f03..292d1d9616a 100644 --- a/src/test/compile-fail/issue-4335.rs +++ b/src/test/compile-fail/issue-4335.rs @@ -18,6 +18,6 @@ fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> { } fn main() { - let v = &5i; + let v = &5is; println!("{}", f(v).call_mut(())); } diff --git a/src/test/compile-fail/issue-7575.rs b/src/test/compile-fail/issue-7575.rs index 0d5156956e5..49e54f25bf6 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 * 4u + i * 4us } fn f9(i: usize) -> usize { - i * 4u + i * 4us } } impl OtherTrait for usize { fn f9(i: usize) -> usize { - i * 8u + i * 8us } } diff --git a/src/test/compile-fail/kindck-impl-type-params-2.rs b/src/test/compile-fail/kindck-impl-type-params-2.rs index e188fa9b813..cd47bd721fc 100644 --- a/src/test/compile-fail/kindck-impl-type-params-2.rs +++ b/src/test/compile-fail/kindck-impl-type-params-2.rs @@ -19,7 +19,7 @@ impl<T:Copy> Foo for T { fn take_param<T:Foo>(foo: &T) { } fn main() { - let x = box 3i; + let x = box 3is; take_param(&x); //~^ ERROR the trait `core::marker::Copy` is not implemented } diff --git a/src/test/compile-fail/kindck-inherited-copy-bound.rs b/src/test/compile-fail/kindck-inherited-copy-bound.rs index 192e358283f..4ccb240071d 100644 --- a/src/test/compile-fail/kindck-inherited-copy-bound.rs +++ b/src/test/compile-fail/kindck-inherited-copy-bound.rs @@ -23,12 +23,12 @@ impl<T:Copy> Foo for T { fn take_param<T:Foo>(foo: &T) { } fn a() { - let x = box 3i; + let x = box 3is; take_param(&x); //~ ERROR `core::marker::Copy` is not implemented } fn b() { - let x = box 3i; + let x = box 3is; let y = &x; let z = &x as &Foo; //~ ERROR `core::marker::Copy` is not implemented } diff --git a/src/test/compile-fail/kindck-nonsendable-1.rs b/src/test/compile-fail/kindck-nonsendable-1.rs index 172587dc1e4..79aec386d9a 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(3u); + let x = Rc::new(3us); bar(move|| foo(x)); //~^ ERROR `core::marker::Send` is not implemented //~^^ ERROR `core::marker::Send` is not implemented diff --git a/src/test/compile-fail/lint-dead-code-1.rs b/src/test/compile-fail/lint-dead-code-1.rs index e55922db3d5..34c79be7118 100644 --- a/src/test/compile-fail/lint-dead-code-1.rs +++ b/src/test/compile-fail/lint-dead-code-1.rs @@ -90,7 +90,7 @@ pub fn pub_fn() { let e = used_enum::foo3; SemiUsedStruct::la_la_la(); - let i = 1i; + let i = 1is; match i { USED_STATIC => (), USED_CONST => (), diff --git a/src/test/compile-fail/lint-dead-code-3.rs b/src/test/compile-fail/lint-dead-code-3.rs index 3662855a720..03b89c522ce 100644 --- a/src/test/compile-fail/lint-dead-code-3.rs +++ b/src/test/compile-fail/lint-dead-code-3.rs @@ -85,6 +85,6 @@ mod inner { } pub fn foo() { - let a = &1i as &inner::Trait; + let a = &1is as &inner::Trait; a.f(); } diff --git a/src/test/compile-fail/lint-dead-code-4.rs b/src/test/compile-fail/lint-dead-code-4.rs index bc2e0940f44..ac8f158f8fb 100644 --- a/src/test/compile-fail/lint-dead-code-4.rs +++ b/src/test/compile-fail/lint-dead-code-4.rs @@ -61,6 +61,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: 42u, b: true, _guard: () }); + field_match_in_let(Bar { x: 42us, 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 3d8d5b407fd..91a4d0fea0a 100644 --- a/src/test/compile-fail/lint-exceeding-bitshifts.rs +++ b/src/test/compile-fail/lint-exceeding-bitshifts.rs @@ -56,7 +56,7 @@ fn main() { let n = 1u8 << (4+3); let n = 1u8 << (4+4); //~ ERROR: bitshift exceeds the type's number of bits - let n = 1i << std::isize::BITS; //~ ERROR: bitshift exceeds the type's number of bits - let n = 1u << std::usize::BITS; //~ 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 } diff --git a/src/test/compile-fail/lint-type-limits.rs b/src/test/compile-fail/lint-type-limits.rs index d5ea092617d..3224dec1c99 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 = 100u; + let mut i = 100us; while i >= 0 { //~ ERROR comparison is useless due to type limits i -= 1; } @@ -50,12 +50,12 @@ fn qux() { } fn quy() { - let i = -23u; //~ WARNING negation of unsigned isize literal may be unintentional + let i = -23us; //~ WARNING negation of unsigned isize literal may be unintentional //~^ WARNING unused variable } fn quz() { - let i = 23u; + let i = 23us; let j = -i; //~ WARNING negation of unsigned isize variable may be unintentional //~^ WARNING unused variable } diff --git a/src/test/compile-fail/lint-unnecessary-parens.rs b/src/test/compile-fail/lint-unnecessary-parens.rs index 158f13bf3f1..4ccc3d8b641 100644 --- a/src/test/compile-fail/lint-unnecessary-parens.rs +++ b/src/test/compile-fail/lint-unnecessary-parens.rs @@ -17,7 +17,7 @@ impl X { } fn foo() -> isize { - return (1i); //~ ERROR unnecessary parentheses around `return` value + return (1is); //~ ERROR unnecessary parentheses around `return` value } fn bar() -> X { return (X { y: true }); //~ ERROR unnecessary parentheses around `return` value @@ -32,8 +32,8 @@ fn main() { match (true) { //~ ERROR unnecessary parentheses around `match` head expression _ => {} } - if let 1i = (1i) {} //~ ERROR unnecessary parentheses around `if let` head expression - while let 1i = (2i) {} //~ ERROR unnecessary parentheses around `while let` head expression + if let 1is = (1is) {} //~ ERROR unnecessary parentheses around `if let` head expression + while let 1is = (2is) {} //~ ERROR unnecessary parentheses around `while let` head expression let v = X { y: false }; // struct lits needs parens, so these shouldn't warn. if (v == X { y: true }) {} @@ -47,7 +47,7 @@ fn main() { _ => {} } - let mut _a = (0i); //~ ERROR unnecessary parentheses around assigned value - _a = (0i); //~ ERROR unnecessary parentheses around assigned value - _a += (1i); //~ ERROR unnecessary parentheses around assigned value + let mut _a = (0is); //~ ERROR unnecessary parentheses around assigned value + _a = (0is); //~ ERROR unnecessary parentheses around assigned value + _a += (1is); //~ ERROR unnecessary parentheses around assigned value } diff --git a/src/test/compile-fail/lint-unused-imports.rs b/src/test/compile-fail/lint-unused-imports.rs index a6d7c587c7b..84d7200314f 100644 --- a/src/test/compile-fail/lint-unused-imports.rs +++ b/src/test/compile-fail/lint-unused-imports.rs @@ -54,7 +54,7 @@ mod bar { pub mod c { use foo::Point; use foo::Square; //~ ERROR unused import - pub fn cc(p: Point) -> isize { return 2i * (p.x + p.y); } + pub fn cc(p: Point) -> isize { return 2is * (p.x + p.y); } } #[allow(unused_imports)] @@ -65,8 +65,8 @@ mod bar { fn main() { cal(foo::Point{x:3, y:9}); - let mut a = 3i; - let mut b = 4i; + let mut a = 3is; + let mut b = 4is; swap(&mut a, &mut b); test::C.b(); let _a = foo(); diff --git a/src/test/compile-fail/lint-unused-mut-variables.rs b/src/test/compile-fail/lint-unused-mut-variables.rs index 4c1a01aac64..501eea770d8 100644 --- a/src/test/compile-fail/lint-unused-mut-variables.rs +++ b/src/test/compile-fail/lint-unused-mut-variables.rs @@ -18,16 +18,16 @@ fn main() { // negative cases - let mut a = 3i; //~ ERROR: variable does not need to be mutable - let mut a = 2i; //~ ERROR: variable does not need to be mutable - let mut b = 3i; //~ ERROR: variable does not need to be mutable - let mut a = vec!(3i); //~ ERROR: variable does not need to be mutable - let (mut a, b) = (1i, 2i); //~ ERROR: variable does not need to be mutable + let mut a = 3is; //~ ERROR: variable does not need to be mutable + let mut a = 2is; //~ ERROR: variable does not need to be mutable + let mut b = 3is; //~ ERROR: variable does not need to be mutable + let mut a = vec!(3is); //~ ERROR: variable does not need to be mutable + let (mut a, b) = (1is, 2is); //~ ERROR: variable does not need to be mutable - match 30i { + match 30is { mut x => {} //~ ERROR: variable does not need to be mutable } - match (30i, 2i) { + match (30is, 2is) { (mut x, 1) | //~ ERROR: variable does not need to be mutable (mut x, 2) | (mut x, 3) => { @@ -35,28 +35,28 @@ fn main() { _ => {} } - let x = |&: mut y: isize| 10i; //~ ERROR: variable does not need to be mutable + let x = |&: mut y: isize| 10is; //~ ERROR: variable does not need to be mutable fn what(mut foo: isize) {} //~ ERROR: variable does not need to be mutable // positive cases - let mut a = 2i; - a = 3i; + let mut a = 2is; + a = 3is; let mut a = Vec::new(); - a.push(3i); + a.push(3is); let mut a = Vec::new(); callback(|| { - a.push(3i); + a.push(3is); }); - let (mut a, b) = (1i, 2i); + let (mut a, b) = (1is, 2is); a = 34; - match 30i { + match 30is { mut x => { - x = 21i; + x = 21is; } } - match (30i, 2i) { + match (30is, 2is) { (mut x, 1) | (mut x, 2) | (mut x, 3) => { @@ -65,12 +65,12 @@ fn main() { _ => {} } - let x = |&mut: mut y: isize| y = 32i; - fn nothing(mut foo: isize) { foo = 37i; } + let x = |&mut: mut y: isize| y = 32is; + fn nothing(mut foo: isize) { foo = 37is; } // leading underscore should avoid the warning, just like the // unused variable lint. - let mut _allowed = 1i; + let mut _allowed = 1is; } fn callback<F>(f: F) where F: FnOnce() {} @@ -78,6 +78,6 @@ fn callback<F>(f: F) where F: FnOnce() {} // make sure the lint attribute can be turned off #[allow(unused_mut)] fn foo(mut a: isize) { - let mut a = 3i; - let mut b = vec!(2i); + let mut a = 3is; + let mut b = vec!(2is); } diff --git a/src/test/compile-fail/liveness-bad-bang-2.rs b/src/test/compile-fail/liveness-bad-bang-2.rs index c612a023365..bb049175594 100644 --- a/src/test/compile-fail/liveness-bad-bang-2.rs +++ b/src/test/compile-fail/liveness-bad-bang-2.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 - println!("{}", 3i); + println!("{}", 3is); } -fn main() { bad_bang(5u); } +fn main() { bad_bang(5us); } diff --git a/src/test/compile-fail/liveness-return-last-stmt-semi.rs b/src/test/compile-fail/liveness-return-last-stmt-semi.rs index b274ad9f3d4..4b8f84ae704 100644 --- a/src/test/compile-fail/liveness-return-last-stmt-semi.rs +++ b/src/test/compile-fail/liveness-return-last-stmt-semi.rs @@ -10,7 +10,7 @@ // // regression test for #8005 -macro_rules! test { () => { fn foo() -> isize { 1i; } } } +macro_rules! test { () => { fn foo() -> isize { 1is; } } } //~^ ERROR not all control paths return a value //~^^ HELP consider removing this semicolon diff --git a/src/test/compile-fail/liveness-unused.rs b/src/test/compile-fail/liveness-unused.rs index 0971709229b..c9f8230b6c5 100644 --- a/src/test/compile-fail/liveness-unused.rs +++ b/src/test/compile-fail/liveness-unused.rs @@ -29,40 +29,40 @@ fn f1d() { } fn f2() { - let x = 3i; + let x = 3is; //~^ ERROR unused variable: `x` } fn f3() { - let mut x = 3i; + let mut x = 3is; //~^ ERROR variable `x` is assigned to, but never used - x += 4i; + x += 4is; //~^ ERROR value assigned to `x` is never read } fn f3b() { - let mut z = 3i; + let mut z = 3is; //~^ ERROR variable `z` is assigned to, but never used loop { - z += 4i; + z += 4is; } } #[allow(unused_variables)] fn f3c() { - let mut z = 3i; - loop { z += 4i; } + let mut z = 3is; + loop { z += 4is; } } #[allow(unused_variables)] #[allow(unused_assignments)] fn f3d() { - let mut x = 3i; - x += 4i; + let mut x = 3is; + x += 4is; } fn f4() { - match Some(3i) { + match Some(3is) { Some(i) => { //~^ ERROR unused variable: `i` } @@ -75,7 +75,7 @@ enum tri { } fn f4b() -> isize { - match tri::a(3i) { + match tri::a(3is) { tri::a(i) | tri::b(i) | tri::c(i) => { i } @@ -83,17 +83,17 @@ fn f4b() -> isize { } fn f5a() { - for x in range(1i, 10) { } + for x in range(1is, 10) { } //~^ ERROR unused variable: `x` } fn f5b() { - for (x, _) in [1i, 2, 3].iter().enumerate() { } + for (x, _) in [1is, 2, 3].iter().enumerate() { } //~^ ERROR unused variable: `x` } fn f5c() { - for (_, x) in [1i, 2, 3].iter().enumerate() { + for (_, x) in [1is, 2, 3].iter().enumerate() { //~^ ERROR unused variable: `x` continue; std::os::set_exit_status(*x); //~ WARNING unreachable statement diff --git a/src/test/compile-fail/liveness-use-after-move.rs b/src/test/compile-fail/liveness-use-after-move.rs index e1cd12989ca..21e52f13060 100644 --- a/src/test/compile-fail/liveness-use-after-move.rs +++ b/src/test/compile-fail/liveness-use-after-move.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = box 5i; + let x = box 5is; let y = x; println!("{}", *x); //~ ERROR use of moved value: `*x` y.clone(); diff --git a/src/test/compile-fail/loop-does-not-diverge.rs b/src/test/compile-fail/loop-does-not-diverge.rs index 9488e6bf969..e2d3d059ad8 100644 --- a/src/test/compile-fail/loop-does-not-diverge.rs +++ b/src/test/compile-fail/loop-does-not-diverge.rs @@ -14,7 +14,7 @@ fn forever() -> ! { loop { break; } - return 42i; //~ ERROR `return` in a function declared as diverging + return 42is; //~ ERROR `return` in a function declared as diverging } fn main() { diff --git a/src/test/compile-fail/macro-no-implicit-reexport.rs b/src/test/compile-fail/macro-no-implicit-reexport.rs index 4a427f121fc..1e2172f4a7c 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!(), 3u); //~ ERROR macro undefined + assert_eq!(reexported!(), 3us); //~ 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 c8e59f98d3c..cf0d79e0fef 100644 --- a/src/test/compile-fail/macro-reexport-not-locally-visible.rs +++ b/src/test/compile-fail/macro-reexport-not-locally-visible.rs @@ -16,5 +16,5 @@ extern crate macro_reexport_1; fn main() { - assert_eq!(reexported!(), 3u); //~ ERROR macro undefined + assert_eq!(reexported!(), 3us); //~ ERROR macro undefined } diff --git a/src/test/compile-fail/match-ill-type1.rs b/src/test/compile-fail/match-ill-type1.rs index 2b4c77bf9e8..908d46f398c 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...2u => 1, //~ ERROR mismatched types in range + 1...2us => 1, //~ ERROR mismatched types in range _ => 2, }; } diff --git a/src/test/compile-fail/match-ill-type2.rs b/src/test/compile-fail/match-ill-type2.rs index 17f02abc8ec..6b6954101b2 100644 --- a/src/test/compile-fail/match-ill-type2.rs +++ b/src/test/compile-fail/match-ill-type2.rs @@ -9,9 +9,9 @@ // except according to those terms. fn main() { - match 1i { - 1i => 1i, - 2u => 1i, //~ ERROR mismatched types - _ => 2i, + match 1is { + 1is => 1is, + 2us => 1is, //~ ERROR mismatched types + _ => 2is, }; } diff --git a/src/test/compile-fail/match-non-exhaustive.rs b/src/test/compile-fail/match-non-exhaustive.rs index 20adbeebdf1..2aeccacb0f6 100644 --- a/src/test/compile-fail/match-non-exhaustive.rs +++ b/src/test/compile-fail/match-non-exhaustive.rs @@ -9,6 +9,6 @@ // except according to those terms. fn main() { - match 0i { 1i => () } //~ ERROR non-exhaustive patterns - match 0i { 0i if false => () } //~ ERROR non-exhaustive patterns + match 0is { 1is => () } //~ ERROR non-exhaustive patterns + match 0is { 0is if false => () } //~ ERROR non-exhaustive patterns } diff --git a/src/test/compile-fail/match-range-fail-dominate.rs b/src/test/compile-fail/match-range-fail-dominate.rs index 7a4451f99ab..7d33963003f 100644 --- a/src/test/compile-fail/match-range-fail-dominate.rs +++ b/src/test/compile-fail/match-range-fail-dominate.rs @@ -15,21 +15,21 @@ //error-pattern: unreachable fn main() { - match 5u { - 1u ... 10u => { } - 5u ... 6u => { } + match 5us { + 1us ... 10us => { } + 5us ... 6us => { } _ => {} }; - match 5u { - 3u ... 6u => { } - 4u ... 6u => { } + match 5us { + 3us ... 6us => { } + 4us ... 6us => { } _ => {} }; - match 5u { - 4u ... 6u => { } - 4u ... 6u => { } + match 5us { + 4us ... 6us => { } + 4us ... 6us => { } _ => {} }; diff --git a/src/test/compile-fail/match-range-fail.rs b/src/test/compile-fail/match-range-fail.rs index 9fbd1545fcf..1c804b0552c 100644 --- a/src/test/compile-fail/match-range-fail.rs +++ b/src/test/compile-fail/match-range-fail.rs @@ -13,8 +13,8 @@ //error-pattern: mismatched types fn main() { - match 5u { - 6u ... 1u => { } + match 5us { + 6us ... 1us => { } _ => { } }; @@ -22,8 +22,8 @@ fn main() { "bar" ... "foo" => { } }; - match 5u { - 'c' ... 100u => { } + match 5us { + 'c' ... 100us => { } _ => { } }; } diff --git a/src/test/compile-fail/match-vec-fixed.rs b/src/test/compile-fail/match-vec-fixed.rs index bac9fef2b17..c35dc8d7c86 100644 --- a/src/test/compile-fail/match-vec-fixed.rs +++ b/src/test/compile-fail/match-vec-fixed.rs @@ -9,7 +9,7 @@ // except according to those terms. fn a() { - let v = [1i, 2, 3]; + let v = [1is, 2, 3]; match v { [_, _, _] => {} [_, _, _] => {} //~ ERROR unreachable pattern 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 91d1e73e232..cab6a8610bf 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() { 1u.me(); } //~ ERROR E0034 +fn main() { 1us.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 dc5f1023b99..87e3655d31e 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() { - 1u.method(); //~ ERROR E0034 + 1us.method(); //~ ERROR E0034 } diff --git a/src/test/compile-fail/method-missing-call.rs b/src/test/compile-fail/method-missing-call.rs index 83418cbc104..899c1ef16a6 100644 --- a/src/test/compile-fail/method-missing-call.rs +++ b/src/test/compile-fail/method-missing-call.rs @@ -33,7 +33,7 @@ fn main() { //~^ HELP maybe a `()` to call it is missing // Ensure the span is useful - let ys = &[1i,2,3,4,5,6,7]; + let ys = &[1is,2,3,4,5,6,7]; let a = ys.iter() .map(|x| x) .filter(|&&x| x == 1) diff --git a/src/test/compile-fail/move-out-of-tuple-field.rs b/src/test/compile-fail/move-out-of-tuple-field.rs index ca09d43d79c..ace6c80e3e3 100644 --- a/src/test/compile-fail/move-out-of-tuple-field.rs +++ b/src/test/compile-fail/move-out-of-tuple-field.rs @@ -13,11 +13,11 @@ struct Foo(Box<isize>); fn main() { - let x = (box 1i,); + let x = (box 1is,); let y = x.0; let z = x.0; //~ ERROR use of moved value: `x.0` - let x = Foo(box 1i); + let x = Foo(box 1is); let y = x.0; let z = x.0; //~ ERROR use of moved value: `x.0` } diff --git a/src/test/compile-fail/moves-based-on-type-exprs.rs b/src/test/compile-fail/moves-based-on-type-exprs.rs index d8d84e558a9..58f1f78fa5d 100644 --- a/src/test/compile-fail/moves-based-on-type-exprs.rs +++ b/src/test/compile-fail/moves-based-on-type-exprs.rs @@ -24,13 +24,13 @@ fn f10() { fn f20() { let x = "hi".to_string(); - let _y = (x, 3i); + let _y = (x, 3is); touch(&x); //~ ERROR use of moved value: `x` } fn f21() { - let x = vec!(1i, 2, 3); - let _y = (x[0], 3i); + let x = vec!(1is, 2, 3); + let _y = (x[0], 3is); touch(&x); } @@ -61,9 +61,9 @@ fn f50(cond: bool) { let x = "hi".to_string(); let y = "ho".to_string(); let _y = match cond { - _ if guard(x) => 10i, - true => 10i, - false => 20i, + _ if guard(x) => 10is, + true => 10is, + false => 20is, }; touch(&x); //~ ERROR use of moved value: `x` touch(&y); diff --git a/src/test/compile-fail/mut-cant-alias.rs b/src/test/compile-fail/mut-cant-alias.rs index ce6e793d55d..847a3eaf8a1 100644 --- a/src/test/compile-fail/mut-cant-alias.rs +++ b/src/test/compile-fail/mut-cant-alias.rs @@ -11,7 +11,7 @@ use std::cell::RefCell; fn main() { - let m = RefCell::new(0i); + let m = RefCell::new(0is); let mut b = m.borrow_mut(); let b1 = &mut *b; let b2 = &mut *b; //~ ERROR cannot borrow diff --git a/src/test/compile-fail/mut-cross-borrowing.rs b/src/test/compile-fail/mut-cross-borrowing.rs index ee4d11c96ca..7fb5c2ac4a4 100644 --- a/src/test/compile-fail/mut-cross-borrowing.rs +++ b/src/test/compile-fail/mut-cross-borrowing.rs @@ -13,7 +13,7 @@ fn f(_: &mut isize) {} fn main() { - let mut x = box 3i; + let mut x = box 3is; f(x) //~ ERROR mismatched types } diff --git a/src/test/compile-fail/mut-not-freeze.rs b/src/test/compile-fail/mut-not-freeze.rs index d7529c86aa5..8c39320276a 100644 --- a/src/test/compile-fail/mut-not-freeze.rs +++ b/src/test/compile-fail/mut-not-freeze.rs @@ -13,7 +13,7 @@ use std::cell::RefCell; fn f<T: Sync>(_: T) {} fn main() { - let x = RefCell::new(0i); + let x = RefCell::new(0is); f(x); //~^ ERROR `core::marker::Sync` is not implemented //~^^ ERROR `core::marker::Sync` is not implemented diff --git a/src/test/compile-fail/mut-pattern-internal-mutability.rs b/src/test/compile-fail/mut-pattern-internal-mutability.rs index 05c6c4a9655..92f02114a13 100644 --- a/src/test/compile-fail/mut-pattern-internal-mutability.rs +++ b/src/test/compile-fail/mut-pattern-internal-mutability.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let foo = &mut 1i; + let foo = &mut 1is; let &mut x = foo; x += 1; //~ ERROR re-assignment of immutable variable diff --git a/src/test/compile-fail/mut-ptr-cant-outlive-ref.rs b/src/test/compile-fail/mut-ptr-cant-outlive-ref.rs index e269a736ce2..74b561c37aa 100644 --- a/src/test/compile-fail/mut-ptr-cant-outlive-ref.rs +++ b/src/test/compile-fail/mut-ptr-cant-outlive-ref.rs @@ -11,7 +11,7 @@ use std::cell::RefCell; fn main() { - let m = RefCell::new(0i); + let m = RefCell::new(0is); let p; { let b = m.borrow(); diff --git a/src/test/compile-fail/mutable-class-fields-2.rs b/src/test/compile-fail/mutable-class-fields-2.rs index 708affe30f3..932c2a9715f 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(52u, 99); + let nyan : cat = cat(52us, 99); nyan.eat(); } diff --git a/src/test/compile-fail/mutable-class-fields.rs b/src/test/compile-fail/mutable-class-fields.rs index 15046c4c51b..a840ac63dd8 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(52u, 99); + let nyan : cat = cat(52us, 99); nyan.how_hungry = 0; //~ ERROR cannot assign } diff --git a/src/test/compile-fail/no-capture-arc.rs b/src/test/compile-fail/no-capture-arc.rs index 3d4d0fee0bf..beb0d0ee47e 100644 --- a/src/test/compile-fail/no-capture-arc.rs +++ b/src/test/compile-fail/no-capture-arc.rs @@ -14,7 +14,7 @@ use std::sync::Arc; use std::thread::Thread; fn main() { - let v = vec!(1i, 2, 3, 4, 5, 6, 7, 8, 9, 10); + let v = vec!(1is, 2, 3, 4, 5, 6, 7, 8, 9, 10); let arc_v = Arc::new(v); Thread::spawn(move|| { diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs index 02028fe62e5..d8f0fa497a4 100644 --- a/src/test/compile-fail/no-reuse-move-arc.rs +++ b/src/test/compile-fail/no-reuse-move-arc.rs @@ -12,7 +12,7 @@ use std::sync::Arc; use std::thread::Thread; fn main() { - let v = vec!(1i, 2, 3, 4, 5, 6, 7, 8, 9, 10); + let v = vec!(1is, 2, 3, 4, 5, 6, 7, 8, 9, 10); let arc_v = Arc::new(v); Thread::spawn(move|| { diff --git a/src/test/compile-fail/no_send-rc.rs b/src/test/compile-fail/no_send-rc.rs index 95855ed584b..82cc319466a 100644 --- a/src/test/compile-fail/no_send-rc.rs +++ b/src/test/compile-fail/no_send-rc.rs @@ -13,7 +13,7 @@ use std::rc::Rc; fn bar<T: Send>(_: T) {} fn main() { - let x = Rc::new(5i); + let x = Rc::new(5is); bar(x); //~^ ERROR `core::marker::Send` is not implemented //~^^ ERROR `core::marker::Send` is not implemented diff --git a/src/test/compile-fail/no_share-rc.rs b/src/test/compile-fail/no_share-rc.rs index 0f3573e0ad5..0d3e380d4a1 100644 --- a/src/test/compile-fail/no_share-rc.rs +++ b/src/test/compile-fail/no_share-rc.rs @@ -14,7 +14,7 @@ use std::cell::RefCell; fn bar<T: Sync>(_: T) {} fn main() { - let x = Rc::new(RefCell::new(5i)); + let x = Rc::new(RefCell::new(5is)); bar(x); //~^ ERROR the trait `core::marker::Sync` is not implemented //~^^ ERROR the trait `core::marker::Sync` is not implemented diff --git a/src/test/compile-fail/non-exhaustive-match.rs b/src/test/compile-fail/non-exhaustive-match.rs index 4c421a689ee..ccf69a4d2c8 100644 --- a/src/test/compile-fail/non-exhaustive-match.rs +++ b/src/test/compile-fail/non-exhaustive-match.rs @@ -16,10 +16,10 @@ fn main() { match true { //~ ERROR non-exhaustive patterns: `false` not covered true => {} } - match Some(10i) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered + match Some(10is) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered None => {} } - match (2i, 3i, 4i) { //~ ERROR non-exhaustive patterns: `(_, _, _)` not covered + match (2is, 3is, 4is) { //~ ERROR non-exhaustive patterns: `(_, _, _)` not covered (_, _, 4) => {} } match (t::a, t::a) { //~ ERROR non-exhaustive patterns: `(a, a)` not covered @@ -35,14 +35,14 @@ fn main() { (_, t::a) => {} (t::b, t::b) => {} } - let vec = vec!(Some(42i), None, Some(21i)); + let vec = vec!(Some(42is), None, Some(21is)); let vec: &[Option<isize>] = vec.as_slice(); match vec { //~ ERROR non-exhaustive patterns: `[]` not covered [Some(..), None, tail..] => {} [Some(..), Some(..), tail..] => {} [None] => {} } - let vec = vec!(1i); + let vec = vec!(1is); let vec: &[isize] = vec.as_slice(); match vec { [_, tail..] => (), @@ -56,7 +56,7 @@ fn main() { [0.1] => (), [] => () } - let vec = vec!(Some(42i), None, Some(21i)); + let vec = vec!(Some(42is), None, Some(21is)); let vec: &[Option<isize>] = vec.as_slice(); match vec { [Some(..), None, tail..] => {} diff --git a/src/test/compile-fail/non-exhaustive-pattern-witness.rs b/src/test/compile-fail/non-exhaustive-pattern-witness.rs index 7442900c9b7..3bd3a0c653c 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([1u, 2u, 3u, 4u]) } => () + Foo { first: false, second: Some([1us, 2us, 3us, 4us]) } => () } } diff --git a/src/test/compile-fail/obsolete-tilde.rs b/src/test/compile-fail/obsolete-tilde.rs index 9c395406f03..d290d5536a4 100644 --- a/src/test/compile-fail/obsolete-tilde.rs +++ b/src/test/compile-fail/obsolete-tilde.rs @@ -15,7 +15,7 @@ fn bar(x: ~str) {} //~ ERROR obsolete syntax: `~` notation for owned pointers fn baz(x: ~[isize]) {} //~ ERROR obsolete syntax: `~[T]` is no longer a type fn main() { - let x = ~4i; //~ ERROR obsolete syntax: `~` notation for owned pointer allocation + let x = ~4is; //~ ERROR obsolete syntax: `~` notation for owned pointer allocation let y = ~"hello"; //~ ERROR obsolete syntax: `~` notation for owned pointer allocation - let z = ~[1i, 2, 3]; //~ ERROR obsolete syntax: `~[T]` is no longer a type + let z = ~[1is, 2, 3]; //~ ERROR obsolete syntax: `~[T]` is no longer a type } diff --git a/src/test/compile-fail/or-patter-mismatch.rs b/src/test/compile-fail/or-patter-mismatch.rs index f845d1e6344..74f674e64ba 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, 2u) { blah::a(_, x, y) | blah::b(x, y) => { } } } +fn main() { match blah::a(1, 1, 2us) { blah::a(_, x, y) | blah::b(x, y) => { } } } diff --git a/src/test/compile-fail/pat-range-bad-dots.rs b/src/test/compile-fail/pat-range-bad-dots.rs index 7fe073a4c3d..7f67d7a5fb1 100644 --- a/src/test/compile-fail/pat-range-bad-dots.rs +++ b/src/test/compile-fail/pat-range-bad-dots.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - match 22i { + match 22is { 0 .. 3 => {} //~ ERROR expected one of `...`, `=>`, or `|`, found `..` _ => {} } diff --git a/src/test/compile-fail/pattern-bindings-after-at.rs b/src/test/compile-fail/pattern-bindings-after-at.rs index 54ac3cba636..70840200aad 100644 --- a/src/test/compile-fail/pattern-bindings-after-at.rs +++ b/src/test/compile-fail/pattern-bindings-after-at.rs @@ -14,7 +14,7 @@ enum Option<T> { } fn main() { - match &mut Some(1i) { + match &mut Some(1is) { ref mut z @ &mut Some(ref a) => { //~^ ERROR pattern bindings are not allowed after an `@` **z = None; diff --git a/src/test/compile-fail/pptypedef.rs b/src/test/compile-fail/pptypedef.rs index b33b89be35d..e3c440d61ce 100644 --- a/src/test/compile-fail/pptypedef.rs +++ b/src/test/compile-fail/pptypedef.rs @@ -11,9 +11,9 @@ fn let_in<T, F>(x: T, f: F) where F: FnOnce(T) {} fn main() { - let_in(3u, |i| { assert!(i == 3is); }); + let_in(3us, |i| { assert!(i == 3is); }); //~^ ERROR expected `usize`, found `isize` - let_in(3i, |i| { assert!(i == 3us); }); + let_in(3is, |i| { assert!(i == 3us); }); //~^ ERROR expected `isize`, found `usize` } diff --git a/src/test/compile-fail/private-method.rs b/src/test/compile-fail/private-method.rs index f897a2bc9f3..e8e26cf8ce3 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(52u, 99); + let nyan : kitties::cat = kitties::cat(52us, 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 45c4b2b7ae1..36b6000ceeb 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(52u, 99); - assert!((nyan.meows == 52u)); + let nyan : cat = cat(52us, 99); + assert!((nyan.meows == 52us)); //~^ ERROR field `meows` of struct `cci_class::kitties::cat` is private } diff --git a/src/test/compile-fail/ptr-coercion.rs b/src/test/compile-fail/ptr-coercion.rs index b7d122cd79d..392a803b0dd 100644 --- a/src/test/compile-fail/ptr-coercion.rs +++ b/src/test/compile-fail/ptr-coercion.rs @@ -13,7 +13,7 @@ pub fn main() { // *const -> *mut - let x: *const isize = &42i; + let x: *const isize = &42is; let x: *mut isize = x; //~ERROR values differ in mutability // & -> *mut diff --git a/src/test/compile-fail/range-1.rs b/src/test/compile-fail/range-1.rs index 1668b868e64..9888c085695 100644 --- a/src/test/compile-fail/range-1.rs +++ b/src/test/compile-fail/range-1.rs @@ -12,7 +12,7 @@ pub fn main() { // Mixed types. - let _ = 0u..10i; + let _ = 0us..10is; //~^ ERROR start and end of range have incompatible types // Float => does not implement iterator. @@ -20,7 +20,7 @@ pub fn main() { //~^ ERROR `for` loop expression has type `core::ops::Range<f32>` which does not implement // Unsized type. - let arr: &[_] = &[1u, 2, 3]; + let arr: &[_] = &[1us, 2, 3]; let range = (*arr)..; //~^ ERROR the trait `core::marker::Sized` is not implemented } diff --git a/src/test/compile-fail/range-2.rs b/src/test/compile-fail/range-2.rs index 40690bd844b..6d176ca3700 100644 --- a/src/test/compile-fail/range-2.rs +++ b/src/test/compile-fail/range-2.rs @@ -12,7 +12,7 @@ pub fn main() { let r = { - (&42i)..&42 + (&42is)..&42 //~^ ERROR borrowed value does not live long enough //~^^ ERROR borrowed value does not live long enough }; diff --git a/src/test/compile-fail/refutable-pattern-errors.rs b/src/test/compile-fail/refutable-pattern-errors.rs index 54b8c7fe4b9..d06c73c4cc0 100644 --- a/src/test/compile-fail/refutable-pattern-errors.rs +++ b/src/test/compile-fail/refutable-pattern-errors.rs @@ -13,6 +13,6 @@ fn func((1, (Some(1), 2...3)): (isize, (Option<isize>, isize))) { } //~^ ERROR refutable pattern in function argument: `(_, _)` not covered fn main() { - let (1i, (Some(1i), 2i...3i)) = (1i, (None, 2i)); + let (1is, (Some(1is), 2is...3is)) = (1is, (None, 2is)); //~^ ERROR refutable pattern in local binding: `(_, _)` not covered } diff --git a/src/test/compile-fail/regions-addr-of-self.rs b/src/test/compile-fail/regions-addr-of-self.rs index 6aeac1bd1b3..b69224d4499 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 += 1u; + *p += 1us; } pub fn chase_cat_2(&mut self) { let p: &mut usize = &mut self.cats_chased; - *p += 1u; + *p += 1us; } } fn dog() -> dog { dog { - cats_chased: 0u + cats_chased: 0us } } 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 33898b2e782..fa76ab758ab 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 = 3u; + *p = 3us; }; } } diff --git a/src/test/compile-fail/regions-close-over-type-parameter-2.rs b/src/test/compile-fail/regions-close-over-type-parameter-2.rs index 8d9bd92a8de..543d4d1620b 100644 --- a/src/test/compile-fail/regions-close-over-type-parameter-2.rs +++ b/src/test/compile-fail/regions-close-over-type-parameter-2.rs @@ -29,7 +29,7 @@ fn main() { // ~Repeat<&'blk isize> where blk is the lifetime of the block below. let _ = { - let tmp0 = 3i; + let tmp0 = 3is; let tmp1 = &tmp0; //~ ERROR `tmp0` does not live long enough repeater3(tmp1) }; diff --git a/src/test/compile-fail/regions-creating-enums.rs b/src/test/compile-fail/regions-creating-enums.rs index 2e7a4051ff2..83cef9397c3 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(3u); - let y = ast::num(4u); + let x = ast::num(3us); + let y = ast::num(4us); let z = ast::add(&x, &y); compute(&z); } diff --git a/src/test/compile-fail/regions-escape-loop-via-variable.rs b/src/test/compile-fail/regions-escape-loop-via-variable.rs index 472df87dd2b..c300c86f70f 100644 --- a/src/test/compile-fail/regions-escape-loop-via-variable.rs +++ b/src/test/compile-fail/regions-escape-loop-via-variable.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let x = 3i; + let x = 3is; // Here, the variable `p` gets inferred to a type with a lifetime // of the loop body. The regionck then determines that this type @@ -17,7 +17,7 @@ fn main() { let mut p = &x; loop { - let x = 1i + *p; + let x = 1is + *p; p = &x; //~ ERROR `x` does not live long enough } } diff --git a/src/test/compile-fail/regions-escape-loop-via-vec.rs b/src/test/compile-fail/regions-escape-loop-via-vec.rs index 22c6bdd2d50..5e6e1858cf1 100644 --- a/src/test/compile-fail/regions-escape-loop-via-vec.rs +++ b/src/test/compile-fail/regions-escape-loop-via-vec.rs @@ -10,7 +10,7 @@ // The type of `y` ends up getting inferred to the type of the block. fn broken() { - let mut x = 3i; + let mut x = 3is; let mut _y = vec!(&mut x); while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed diff --git a/src/test/compile-fail/regions-infer-proc-static-upvar.rs b/src/test/compile-fail/regions-infer-proc-static-upvar.rs index bf05554e6d0..4e99f64dbf7 100644 --- a/src/test/compile-fail/regions-infer-proc-static-upvar.rs +++ b/src/test/compile-fail/regions-infer-proc-static-upvar.rs @@ -16,7 +16,7 @@ fn foo<F:FnOnce()+'static>(_p: F) { } static i: isize = 3; fn capture_local() { - let x = 3i; + let x = 3is; let y = &x; //~ ERROR `x` does not live long enough foo(move|| { let _a = *y; 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 d7b2a45cc63..21586f78db3 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 = 0u; + let mut x = 0us; let mut f = |&mut:| &mut x; //~ ERROR cannot infer let x = f(); let y = f(); diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs index 12f5f295499..583d9695be4 100644 --- a/src/test/compile-fail/regions-steal-closure.rs +++ b/src/test/compile-fail/regions-steal-closure.rs @@ -21,7 +21,7 @@ fn box_it<'r>(x: Box<FnMut() + 'r>) -> closure_box<'r> { fn main() { let cl_box = { - let mut i = 3i; + let mut i = 3is; box_it(box || i += 1) //~ ERROR cannot infer }; cl_box.cl.call_mut(()); diff --git a/src/test/compile-fail/regions-trait-1.rs b/src/test/compile-fail/regions-trait-1.rs index d5ef9f3a964..63052580dc2 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: 22u }; + let ctxt = ctxt { v: 22us }; let hc = has_ctxt { c: &ctxt }; - assert_eq!(get_v(box hc as Box<get_ctxt>), 22u); + assert_eq!(get_v(box hc as Box<get_ctxt>), 22us); } diff --git a/src/test/compile-fail/regions-trait-2.rs b/src/test/compile-fail/regions-trait-2.rs index 0f298492e61..8b36e87db3e 100644 --- a/src/test/compile-fail/regions-trait-2.rs +++ b/src/test/compile-fail/regions-trait-2.rs @@ -26,7 +26,7 @@ impl<'a> get_ctxt for has_ctxt<'a> { } fn make_gc() -> @get_ctxt { - let ctxt = ctxt { v: 22u }; + let ctxt = ctxt { v: 22us }; let hc = has_ctxt { c: &ctxt }; return @hc as @get_ctxt; //~^ ERROR source contains reference diff --git a/src/test/compile-fail/regions-var-type-out-of-scope.rs b/src/test/compile-fail/regions-var-type-out-of-scope.rs index a954b16699f..039de994ea3 100644 --- a/src/test/compile-fail/regions-var-type-out-of-scope.rs +++ b/src/test/compile-fail/regions-var-type-out-of-scope.rs @@ -14,8 +14,8 @@ fn foo(cond: bool) { let mut x; if cond { - x = &3i; //~ ERROR borrowed value does not live long enough - assert_eq!(*x, 3i); + x = &3is; //~ ERROR borrowed value does not live long enough + assert_eq!(*x, 3is); } } diff --git a/src/test/compile-fail/repeat_count.rs b/src/test/compile-fail/repeat_count.rs index f851a8244f6..e94bf19955b 100644 --- a/src/test/compile-fail/repeat_count.rs +++ b/src/test/compile-fail/repeat_count.rs @@ -24,6 +24,6 @@ fn main() { //~^ ERROR: expected `usize`, found `&'static str` let f = [0; -4]; //~^ ERROR expected positive integer for repeat count, found negative integer - let f = [0u; -1]; + let f = [0us; -1]; //~^ ERROR expected positive integer for repeat count, found negative integer } diff --git a/src/test/compile-fail/shadowed-lifetime.rs b/src/test/compile-fail/shadowed-lifetime.rs index a2a603a4b6a..57a2744d8f8 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 = 3u; //~ ERROR mismatched types + let x: isize = 3us; //~ ERROR mismatched types } diff --git a/src/test/compile-fail/static-assert2.rs b/src/test/compile-fail/static-assert2.rs index 6adc3b0aaf8..e988cfb9097 100644 --- a/src/test/compile-fail/static-assert2.rs +++ b/src/test/compile-fail/static-assert2.rs @@ -11,6 +11,6 @@ #![allow(dead_code)] #[static_assert] -static E: bool = 1i == 2; //~ ERROR static assertion failed +static E: bool = 1is == 2; //~ ERROR static assertion failed fn main() {} diff --git a/src/test/compile-fail/static-mut-not-pat.rs b/src/test/compile-fail/static-mut-not-pat.rs index d4170608559..bfdeff6ed70 100644 --- a/src/test/compile-fail/static-mut-not-pat.rs +++ b/src/test/compile-fail/static-mut-not-pat.rs @@ -19,7 +19,7 @@ fn main() { // name as a variable, hence this should be an unreachable pattern situation // instead of spitting out a custom error about some identifier collisions // (we should allow shadowing) - match 4i { + match 4is { a => {} //~ ERROR static variables cannot be referenced in a pattern _ => {} } diff --git a/src/test/compile-fail/static-region-bound.rs b/src/test/compile-fail/static-region-bound.rs index 42f9d24bc52..4c59e7a769f 100644 --- a/src/test/compile-fail/static-region-bound.rs +++ b/src/test/compile-fail/static-region-bound.rs @@ -13,8 +13,8 @@ fn f<T:'static>(_: T) {} fn main() { - let x = box 3i; + let x = box 3is; f(x); - let x = &3i; //~ ERROR borrowed value does not live long enough + let x = &3is; //~ ERROR borrowed value does not live long enough f(x); } diff --git a/src/test/compile-fail/tail-typeck.rs b/src/test/compile-fail/tail-typeck.rs index 99e98b24b63..a934bbe61c4 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 0u; } +fn g() -> usize { return 0us; } fn main() { let y = f(); } diff --git a/src/test/compile-fail/trailing-plus-in-bounds.rs b/src/test/compile-fail/trailing-plus-in-bounds.rs index b189acb685a..069c2e88793 100644 --- a/src/test/compile-fail/trailing-plus-in-bounds.rs +++ b/src/test/compile-fail/trailing-plus-in-bounds.rs @@ -11,7 +11,7 @@ use std::fmt::Show; fn main() { - let x: Box<Show+> = box 3i as Box<Show+>; + let x: Box<Show+> = box 3is as Box<Show+>; //~^ ERROR at least one type parameter bound must be specified //~^^ ERROR at least one type parameter bound must be specified } diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs index 479f21ea3a1..45a74a235e0 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs @@ -17,7 +17,7 @@ struct Foo<T:Trait> { fn main() { let foo = Foo { //~^ ERROR not implemented - x: 3i + x: 3is }; let baz: Foo<usize> = panic!(); diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs index d3689067aef..6179301c11d 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs @@ -17,7 +17,7 @@ use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait}; fn main() { let foo = Foo { //~^ ERROR not implemented - x: 3i + x: 3is }; let bar: Bar<f64> = return; //~^ ERROR not implemented diff --git a/src/test/compile-fail/trait-test-2.rs b/src/test/compile-fail/trait-test-2.rs index 583d0421d1e..bdfc6dcda88 100644 --- a/src/test/compile-fail/trait-test-2.rs +++ b/src/test/compile-fail/trait-test-2.rs @@ -15,7 +15,7 @@ impl bar for isize { fn dup(&self) -> isize { *self } fn blah<X>(&self) {} } impl bar for usize { fn dup(&self) -> usize { *self } fn blah<X>(&self) {} } fn main() { - 10i.dup::<isize>(); //~ ERROR does not take type parameters - 10i.blah::<isize, isize>(); //~ ERROR incorrect number of type parameters - (box 10i as Box<bar>).dup(); //~ ERROR cannot convert to a trait object + 10is.dup::<isize>(); //~ ERROR does not take type parameters + 10is.blah::<isize, isize>(); //~ ERROR incorrect number of type parameters + (box 10is as Box<bar>).dup(); //~ ERROR cannot convert to a trait object } diff --git a/src/test/compile-fail/traits-multidispatch-bad.rs b/src/test/compile-fail/traits-multidispatch-bad.rs index f655844e2f3..e9a4005b4b4 100644 --- a/src/test/compile-fail/traits-multidispatch-bad.rs +++ b/src/test/compile-fail/traits-multidispatch-bad.rs @@ -26,7 +26,7 @@ where T : Convert<U> } fn a() { - test(22i, 44i); //~ ERROR not implemented + test(22is, 44is); //~ ERROR not implemented } fn main() {} diff --git a/src/test/compile-fail/typeck-unsafe-always-share.rs b/src/test/compile-fail/typeck-unsafe-always-share.rs index 5166a4e9654..a9113c6e99f 100644 --- a/src/test/compile-fail/typeck-unsafe-always-share.rs +++ b/src/test/compile-fail/typeck-unsafe-always-share.rs @@ -28,7 +28,7 @@ fn test<T: Sync>(s: T){ } fn main() { - let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0i)}); + let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0is)}); test(us); //~^ ERROR `core::marker::Sync` is not implemented diff --git a/src/test/compile-fail/typeck_type_placeholder_item.rs b/src/test/compile-fail/typeck_type_placeholder_item.rs index aa4ecad6393..d69c0dc5d1f 100644 --- a/src/test/compile-fail/typeck_type_placeholder_item.rs +++ b/src/test/compile-fail/typeck_type_placeholder_item.rs @@ -14,7 +14,7 @@ fn test() -> _ { 5 } //~^ ERROR the type placeholder `_` is not allowed within types on item signatures -fn test2() -> (_, _) { (5u, 5u) } +fn test2() -> (_, _) { (5us, 5us) } //~^ ERROR the type placeholder `_` is not allowed within types on item signatures //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures @@ -67,7 +67,7 @@ pub fn main() { fn fn_test() -> _ { 5 } //~^ ERROR the type placeholder `_` is not allowed within types on item signatures - fn fn_test2() -> (_, _) { (5u, 5u) } + fn fn_test2() -> (_, _) { (5us, 5us) } //~^ ERROR the type placeholder `_` is not allowed within types on item signatures //~^^ ERROR the type placeholder `_` is not allowed within types on item signatures diff --git a/src/test/compile-fail/typeck_type_placeholder_lifetime_1.rs b/src/test/compile-fail/typeck_type_placeholder_lifetime_1.rs index 9694c1d9f98..e1d17e4fef7 100644 --- a/src/test/compile-fail/typeck_type_placeholder_lifetime_1.rs +++ b/src/test/compile-fail/typeck_type_placeholder_lifetime_1.rs @@ -16,6 +16,6 @@ struct Foo<'a, T:'a> { } pub fn main() { - let c: Foo<_, _> = Foo { r: &5u }; + let c: Foo<_, _> = Foo { r: &5us }; //~^ ERROR wrong number of type arguments: expected 1, found 2 } diff --git a/src/test/compile-fail/unboxed-closure-illegal-move.rs b/src/test/compile-fail/unboxed-closure-illegal-move.rs index 4d6f04da026..d489c3a64fa 100644 --- a/src/test/compile-fail/unboxed-closure-illegal-move.rs +++ b/src/test/compile-fail/unboxed-closure-illegal-move.rs @@ -18,28 +18,28 @@ fn main() { // By-ref cases { - let x = box 0u; + let x = box 0us; let f = |&:| drop(x); //~ cannot move } { - let x = box 0u; + let x = box 0us; let f = |&mut:| drop(x); //~ cannot move } { - let x = box 0u; + let x = box 0us; let f = |:| drop(x); //~ cannot move } // By-value cases { - let x = box 0u; + let x = box 0us; let f = move |&:| drop(x); //~ cannot move } { - let x = box 0u; + let x = box 0us; let f = move |&mut:| drop(x); //~ cannot move } { - let x = box 0u; + let x = box 0us; let f = 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 3848f07a089..ebdd3c3107f 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 = 0u; + let x = 0us; move |&mut:| x = 1; //~ ERROR cannot assign move |&mut:| 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 2a71aeaca5f..9d966798694 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 = 0u; + let x = 0us; |:| 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 baf7f3f5e58..bb92e57d70c 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 = 0u; + let mut x = 0us; 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-infer-argument-types-two-region-pointers.rs b/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs index 72109b22957..525d0b31995 100644 --- a/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs +++ b/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs @@ -23,7 +23,7 @@ fn doit<T,F>(val: T, f: &F) } pub fn main() { - doit(0i, &|&: x, y| { + doit(0is, &|&: x, y| { x.set(y); //~ ERROR cannot infer }); } diff --git a/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs b/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs index ddd2649a3fe..22bfabf040a 100644 --- a/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs +++ b/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs @@ -12,6 +12,6 @@ fn main() { let mut_ = |&mut: x| x; - mut_.call((0i, )); //~ ERROR does not implement any method in scope named `call` + mut_.call((0is, )); //~ ERROR does not implement any method in scope named `call` } diff --git a/src/test/compile-fail/unboxed-closures-type-mismatch.rs b/src/test/compile-fail/unboxed-closures-type-mismatch.rs index 6c2e9f431fe..f7ac2274ffb 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 = |&mut: x: isize, y: isize| -> isize { x + y }; - let z = f(1u, 2); //~ ERROR mismatched types + let z = f(1us, 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 ae354729b92..4b7f11b0560 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -16,7 +16,7 @@ fn f<T:Send>(_i: T) { } fn main() { - let i = box Rc::new(100i); + let i = box Rc::new(100is); f(i); //~^ ERROR `core::marker::Send` is not implemented //~^^ ERROR `core::marker::Send` is not implemented diff --git a/src/test/compile-fail/unreachable-arm.rs b/src/test/compile-fail/unreachable-arm.rs index c277e63aba9..f403457efbc 100644 --- a/src/test/compile-fail/unreachable-arm.rs +++ b/src/test/compile-fail/unreachable-arm.rs @@ -14,4 +14,4 @@ enum foo { a(Box<foo>, isize), b(usize), } -fn main() { match foo::b(1u) { foo::b(_) | foo::a(box _, 1) => { } foo::a(_, 1) => { } } } +fn main() { match foo::b(1us) { foo::b(_) | foo::a(box _, 1) => { } foo::a(_, 1) => { } } } diff --git a/src/test/compile-fail/unreachable-code.rs b/src/test/compile-fail/unreachable-code.rs index 87342352e9a..d96578f2df9 100644 --- a/src/test/compile-fail/unreachable-code.rs +++ b/src/test/compile-fail/unreachable-code.rs @@ -14,5 +14,5 @@ fn main() { loop{} - let a = 3i; //~ ERROR: unreachable statement + let a = 3is; //~ ERROR: unreachable statement } diff --git a/src/test/compile-fail/unsized3.rs b/src/test/compile-fail/unsized3.rs index 2d330654881..9d4cfe0f4ac 100644 --- a/src/test/compile-fail/unsized3.rs +++ b/src/test/compile-fail/unsized3.rs @@ -55,12 +55,12 @@ fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) { // Test some tuples. fn f9<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) { - f5(&(*x1, 34i)); + f5(&(*x1, 34is)); //~^ ERROR the trait `core::marker::Sized` is not implemented } fn f10<X: ?Sized>(x1: Box<S<X>>, x2: Box<E<X>>) { - f5(&(32i, *x2)); + f5(&(32is, *x2)); //~^ ERROR the trait `core::marker::Sized` is not implemented } diff --git a/src/test/compile-fail/unsized6.rs b/src/test/compile-fail/unsized6.rs index 2129f075a81..21953d1bb09 100644 --- a/src/test/compile-fail/unsized6.rs +++ b/src/test/compile-fail/unsized6.rs @@ -27,12 +27,12 @@ fn f2<X: ?Sized + T>(x: &X) { fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) { let y: X = *x1; //~ERROR the trait `core::marker::Sized` is not implemented let y = *x2; //~ERROR the trait `core::marker::Sized` is not implemented - let (y, z) = (*x3, 4i); //~ERROR the trait `core::marker::Sized` is not implemented + let (y, z) = (*x3, 4is); //~ERROR the trait `core::marker::Sized` is not implemented } fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) { let y: X = *x1; //~ERROR the trait `core::marker::Sized` is not implemented let y = *x2; //~ERROR the trait `core::marker::Sized` is not implemented - let (y, z) = (*x3, 4i); //~ERROR the trait `core::marker::Sized` is not implemented + let (y, z) = (*x3, 4is); //~ERROR the trait `core::marker::Sized` is not implemented } fn g1<X: ?Sized>(x: X) {} //~ERROR the trait `core::marker::Sized` is not implemented diff --git a/src/test/compile-fail/unused-mut-warning-captured-var.rs b/src/test/compile-fail/unused-mut-warning-captured-var.rs index 2c000e03ce4..aa5adb6a6b0 100644 --- a/src/test/compile-fail/unused-mut-warning-captured-var.rs +++ b/src/test/compile-fail/unused-mut-warning-captured-var.rs @@ -11,7 +11,7 @@ #![forbid(unused_mut)] fn main() { - let mut x = 1i; + let mut x = 1is; //~^ ERROR: variable does not need to be mutable move|:| { println!("{}", x); }; } diff --git a/src/test/compile-fail/vec-matching-obsolete-syntax.rs b/src/test/compile-fail/vec-matching-obsolete-syntax.rs index 6330aac2d8b..2715b31d196 100644 --- a/src/test/compile-fail/vec-matching-obsolete-syntax.rs +++ b/src/test/compile-fail/vec-matching-obsolete-syntax.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let x = [1i, 2, 3]; + let x = [1is, 2, 3]; match x { [a, b, ..c] => { //~ ERROR obsolete syntax assert_eq!(a, 1); diff --git a/src/test/compile-fail/vec-mut-iter-borrow.rs b/src/test/compile-fail/vec-mut-iter-borrow.rs index b60d1799f77..59c490f2fff 100644 --- a/src/test/compile-fail/vec-mut-iter-borrow.rs +++ b/src/test/compile-fail/vec-mut-iter-borrow.rs @@ -12,6 +12,6 @@ fn main() { let mut xs: Vec<isize> = vec!(); for x in xs.iter_mut() { - xs.push(1i) //~ ERROR cannot borrow `xs` + xs.push(1is) //~ ERROR cannot borrow `xs` } } diff --git a/src/test/compile-fail/vtable-res-trait-param.rs b/src/test/compile-fail/vtable-res-trait-param.rs index 32a6c65b133..bbe88379aa7 100644 --- a/src/test/compile-fail/vtable-res-trait-param.rs +++ b/src/test/compile-fail/vtable-res-trait-param.rs @@ -23,11 +23,11 @@ impl TraitB for isize { } fn call_it<B:TraitB>(b: B) -> isize { - let y = 4u; + let y = 4us; b.gimme_an_a(y) //~ ERROR the trait `TraitA` is not implemented } fn main() { - let x = 3i; + let x = 3is; assert_eq!(call_it(x), 22); } diff --git a/src/test/compile-fail/warn-path-statement.rs b/src/test/compile-fail/warn-path-statement.rs index 8b6d160a6c5..304900df776 100644 --- a/src/test/compile-fail/warn-path-statement.rs +++ b/src/test/compile-fail/warn-path-statement.rs @@ -11,6 +11,6 @@ // compile-flags: -D path-statement fn main() { - let x = 10i; + let x = 10is; x; //~ ERROR path statement with no effect } diff --git a/src/test/compile-fail/where-clauses-not-parameter.rs b/src/test/compile-fail/where-clauses-not-parameter.rs index 65205cc72ee..5573464c5ab 100644 --- a/src/test/compile-fail/where-clauses-not-parameter.rs +++ b/src/test/compile-fail/where-clauses-not-parameter.rs @@ -41,5 +41,5 @@ impl Baz<isize> for isize where isize : Eq { } fn main() { - equal(&0i, &0i); + equal(&0is, &0is); } diff --git a/src/test/compile-fail/while-let.rs b/src/test/compile-fail/while-let.rs index adb8ee6940d..45e0d0aaeab 100644 --- a/src/test/compile-fail/while-let.rs +++ b/src/test/compile-fail/while-let.rs @@ -20,16 +20,16 @@ fn macros() { }} } - foo!(a, 1i, { //~ ERROR irrefutable while-let + foo!(a, 1is, { //~ ERROR irrefutable while-let println!("irrefutable pattern"); }); - bar!(a, 1i, { //~ ERROR irrefutable while-let + bar!(a, 1is, { //~ ERROR irrefutable while-let println!("irrefutable pattern"); }); } pub fn main() { - while let a = 1i { //~ ERROR irrefutable while-let + while let a = 1is { //~ ERROR irrefutable while-let println!("irrefutable pattern"); } } |
