diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-06-27 12:30:25 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-06-29 11:47:58 -0700 |
| commit | a5bb0a3a4574af88add700ace7aefc37172fa7a5 (patch) | |
| tree | 5c2505254a2fdc396d600807b071c00b064c18b7 /src/test | |
| parent | bd9563aa382ccfbda36049786329edcdc609930c (diff) | |
| download | rust-a5bb0a3a4574af88add700ace7aefc37172fa7a5.tar.gz rust-a5bb0a3a4574af88add700ace7aefc37172fa7a5.zip | |
librustc: Remove the fallback to `int` for integers and `f64` for
floating point numbers for real.
This will break code that looks like:
let mut x = 0;
while ... {
x += 1;
}
println!("{}", x);
Change that code to:
let mut x = 0i;
while ... {
x += 1;
}
println!("{}", x);
Closes #15201.
[breaking-change]
Diffstat (limited to 'src/test')
285 files changed, 944 insertions, 923 deletions
diff --git a/src/test/auxiliary/issue-8044.rs b/src/test/auxiliary/issue-8044.rs index c0c884f5480..d8f96e5abd4 100644 --- a/src/test/auxiliary/issue-8044.rs +++ b/src/test/auxiliary/issue-8044.rs @@ -23,5 +23,5 @@ pub fn leaf<V>(value: V) -> TreeItem<V> { } fn main() { - BTree::<int> { node: leaf(1) }; + BTree::<int> { node: leaf(1i) }; } diff --git a/src/test/auxiliary/issue-9906.rs b/src/test/auxiliary/issue-9906.rs index 1e746bf39db..c0cb501735d 100644 --- a/src/test/auxiliary/issue-9906.rs +++ b/src/test/auxiliary/issue-9906.rs @@ -22,6 +22,6 @@ mod other { } pub fn foo(){ - 1+1; + 1i+1; } } diff --git a/src/test/compile-fail/borrowck-anon-fields-tuple.rs b/src/test/compile-fail/borrowck-anon-fields-tuple.rs index ebaed01756f..9a452ed18f6 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 = (1, 2); + let mut y = (1i, 2i); let a = match y { (ref mut a, _) => a @@ -27,7 +27,7 @@ fn distinct_variant() { } fn same_variant() { - let mut y = (1, 2); + let mut y = (1i, 2i); 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 c7fb646f585..c872d0dc4b9 100644 --- a/src/test/compile-fail/borrowck-array-double-move.rs +++ b/src/test/compile-fail/borrowck-array-double-move.rs @@ -9,9 +9,9 @@ // except according to those terms. fn f() { - let mut a = [box 0, box 1]; + let mut a = [box 0i, box 1i]; drop(a[0]); - a[1] = box 2; + a[1] = box 2i; 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 de18759e30a..0b10ccfdca1 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() -> int { let x: int; - while 1 != 2 { + while 1i != 2 { break; x = 0; } println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` - return 17; + return 17i; } 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 ce8b17ea40b..886026e45d9 100644 --- a/src/test/compile-fail/borrowck-closures-mut-and-imm.rs +++ b/src/test/compile-fail/borrowck-closures-mut-and-imm.rs @@ -21,37 +21,37 @@ fn set(x: &mut int) { } fn a() { - let mut x = 3; + let mut x = 3i; let c1 = || x = 4; let c2 = || x * 5; //~ ERROR cannot borrow `x` } fn b() { - let mut x = 3; + let mut x = 3i; let c1 = || set(&mut x); let c2 = || get(&x); //~ ERROR cannot borrow `x` } fn c() { - let mut x = 3; + let mut x = 3i; let c1 = || set(&mut x); let c2 = || x * 5; //~ ERROR cannot borrow `x` } fn d() { - let mut x = 3; + let mut x = 3i; let c2 = || x * 5; x = 5; //~ ERROR cannot assign } fn e() { - let mut x = 3; + let mut x = 3i; let c1 = || get(&x); x = 5; //~ ERROR cannot assign } fn f() { - let mut x = box 3; + let mut x = box 3i; let c1 = || 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 e1967d4e6df..6d382854d49 100644 --- a/src/test/compile-fail/borrowck-closures-two-mut.rs +++ b/src/test/compile-fail/borrowck-closures-two-mut.rs @@ -14,7 +14,7 @@ fn a() { - let mut x = 3; + let mut x = 3i; let c1 = || x = 4; let c2 = || x = 5; //~ ERROR cannot borrow `x` as mutable more than once } @@ -24,19 +24,19 @@ fn set(x: &mut int) { } fn b() { - let mut x = 3; + let mut x = 3i; let c1 = || set(&mut x); let c2 = || set(&mut x); //~ ERROR cannot borrow `x` as mutable more than once } fn c() { - let mut x = 3; + let mut x = 3i; let c1 = || x = 5; let c2 = || set(&mut x); //~ ERROR cannot borrow `x` as mutable more than once } fn d() { - let mut x = 3; + let mut x = 3i; let c1 = || x = 5; let c2 = || { let _y = || set(&mut x); }; // (nested closure) //~^ ERROR cannot borrow `x` as mutable more than once diff --git a/src/test/compile-fail/borrowck-if-no-else.rs b/src/test/compile-fail/borrowck-if-no-else.rs index a35b36fd78c..854d42219ea 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: int) { println!("{}", x); } fn main() { - let x: int; if 1 > 2 { x = 10; } + let x: int; if 1i > 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 6e2dae0af7d..74888cca2d4 100644 --- a/src/test/compile-fail/borrowck-if-with-else.rs +++ b/src/test/compile-fail/borrowck-if-with-else.rs @@ -14,7 +14,7 @@ fn foo(x: int) { println!("{:?}", x); } fn main() { let x: int; - if 1 > 2 { + if 1i > 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 8af10231921..d127e9345cd 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 = 3; + let mut _a = 3i; 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 9313473d6c9..9d28b2a436f 100644 --- a/src/test/compile-fail/borrowck-issue-2657-1.rs +++ b/src/test/compile-fail/borrowck-issue-2657-1.rs @@ -9,11 +9,11 @@ // except according to those terms. fn main() { -let x = Some(box 1); -match x { - Some(ref _y) => { - let _a = x; //~ ERROR cannot move - } - _ => {} -} + let x = Some(box 1i); + 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 39c3ae8fdfd..973cf3bf8c8 100644 --- a/src/test/compile-fail/borrowck-issue-2657-2.rs +++ b/src/test/compile-fail/borrowck-issue-2657-2.rs @@ -9,11 +9,11 @@ // except according to those terms. fn main() { -let x = Some(box 1); -match x { - Some(ref y) => { - let _b = *y; //~ ERROR cannot move out - } - _ => {} -} + let x = Some(box 1i); + match x { + Some(ref y) => { + let _b = *y; //~ ERROR cannot move out + } + _ => {} + } } diff --git a/src/test/compile-fail/borrowck-lend-flow-match.rs b/src/test/compile-fail/borrowck-lend-flow-match.rs index 7a494b5959a..c6020df2bc2 100644 --- a/src/test/compile-fail/borrowck-lend-flow-match.rs +++ b/src/test/compile-fail/borrowck-lend-flow-match.rs @@ -35,20 +35,20 @@ fn guard() { // Here the guard performs a borrow. This borrow "infects" all // subsequent arms (but not the prior ones). - let mut a = box 3; - let mut b = box 4; + let mut a = box 3u; + let mut b = box 4u; let mut w = &*a; - match 22 { + match 22i { _ if cond() => { - b = box 5; + b = box 5u; } _ if link(&*b, &mut w) => { - b = box 6; //~ ERROR cannot assign + b = box 6u; //~ ERROR cannot assign } _ => { - b = box 7; //~ ERROR cannot assign + b = box 7u; //~ ERROR cannot assign } } diff --git a/src/test/compile-fail/borrowck-let-suggestion.rs b/src/test/compile-fail/borrowck-let-suggestion.rs index a03087f9b2d..385111170b1 100644 --- a/src/test/compile-fail/borrowck-let-suggestion.rs +++ b/src/test/compile-fail/borrowck-let-suggestion.rs @@ -9,9 +9,9 @@ // except according to those terms. fn f() { - let x = [1].iter(); //~ ERROR borrowed value does not live long enough - //~^^ NOTE reference must be valid for the block - //~^^ NOTE consider using a `let` binding to increase its lifetime + let x = [1i].iter(); //~ ERROR borrowed value does not live long enough + //~^^ NOTE reference must be valid for the block + //~^^ NOTE consider using a `let` binding to increase its lifetime } fn main() { diff --git a/src/test/compile-fail/borrowck-managed-pointer-deref-scope.rs b/src/test/compile-fail/borrowck-managed-pointer-deref-scope.rs index dba2c7dca76..30430e00ef3 100644 --- a/src/test/compile-fail/borrowck-managed-pointer-deref-scope.rs +++ b/src/test/compile-fail/borrowck-managed-pointer-deref-scope.rs @@ -24,10 +24,10 @@ fn foo<'a>(x: &'a Gc<int>) -> &'a int { } fn bar() { - let a = 3; + let a = 3i; let mut y = &a; if true { - let x = box(GC) 3; + let x = box(GC) 3i; y = &*x; //~ ERROR `*x` does not live long enough } } 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 6b5dd570e34..f599f237ba6 100644 --- a/src/test/compile-fail/borrowck-match-binding-is-assignment.rs +++ b/src/test/compile-fail/borrowck-match-binding-is-assignment.rs @@ -43,7 +43,7 @@ pub fn main() { } } - match [1,2,3] { + match [1i,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 35106487f34..63409f5afb0 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 @@ -12,7 +12,7 @@ // borrowed path. fn main() { - let a = box box 2; + let a = box box 2i; 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 1a96e5ef4b0..79626179163 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!(1, 2)).move_iter(); + let _x = Rc::new(vec!(1i, 2)).move_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 e12d2b91479..6faa634ad00 100644 --- a/src/test/compile-fail/borrowck-multiple-captures.rs +++ b/src/test/compile-fail/borrowck-multiple-captures.rs @@ -13,9 +13,9 @@ use std::task; fn borrow<T>(_: &T) { } fn different_vars_after_borrows() { - let x1 = box 1; + let x1 = box 1i; let p1 = &x1; - let x2 = box 2; + let x2 = box 2i; let p2 = &x2; task::spawn(proc() { drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed @@ -26,9 +26,9 @@ fn different_vars_after_borrows() { } fn different_vars_after_moves() { - let x1 = box 1; + let x1 = box 1i; drop(x1); - let x2 = box 2; + let x2 = box 2i; drop(x2); task::spawn(proc() { drop(x1); //~ ERROR capture of moved value: `x1` @@ -37,7 +37,7 @@ fn different_vars_after_moves() { } fn same_var_after_borrow() { - let x = box 1; + let x = box 1i; let p = &x; task::spawn(proc() { drop(x); //~ ERROR cannot move `x` into closure because it is borrowed @@ -47,7 +47,7 @@ fn same_var_after_borrow() { } fn same_var_after_move() { - let x = box 1; + let x = box 1i; drop(x); task::spawn(proc() { drop(x); //~ ERROR capture of moved value: `x` diff --git a/src/test/compile-fail/borrowck-uniq-via-lend.rs b/src/test/compile-fail/borrowck-uniq-via-lend.rs index fb03ad61f3d..5a129956487 100644 --- a/src/test/compile-fail/borrowck-uniq-via-lend.rs +++ b/src/test/compile-fail/borrowck-uniq-via-lend.rs @@ -12,7 +12,7 @@ fn borrow(_v: &int) {} fn local() { - let mut v = box 3; + let mut v = box 3i; borrow(v); } @@ -31,27 +31,27 @@ fn local_recs() { } fn aliased_imm() { - let mut v = box 3; + let mut v = box 3i; let _w = &v; borrow(v); } fn aliased_mut() { - let mut v = box 3; + let mut v = box 3i; let _w = &mut v; borrow(v); //~ ERROR cannot borrow `*v` } fn aliased_other() { - let mut v = box 3; - let mut w = box 4; + let mut v = box 3i; + let mut w = box 4i; let _x = &mut w; borrow(v); } fn aliased_other_reassign() { - let mut v = box 3; - let mut w = box 4; + let mut v = box 3i; + let mut w = box 4i; 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 cca8ed93388..7b092d16eec 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 = [1, 2, 3, 4]; + let mut a = [1i, 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 f41f74b166f..4a56f982106 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs @@ -10,7 +10,7 @@ fn a() { - let mut vec = [box 1, box 2, box 3]; + let mut vec = [box 1i, box 2, box 3]; match vec { [box ref _a, _, _] => { vec[0] = box 4; //~ ERROR cannot assign @@ -19,7 +19,7 @@ fn a() { } fn b() { - let mut vec = vec!(box 1, box 2, box 3); + let mut vec = vec!(box 1i, box 2, box 3); let vec: &mut [Box<int>] = vec.as_mut_slice(); match vec { [.._b] => { @@ -29,7 +29,7 @@ fn b() { } fn c() { - let mut vec = vec!(box 1, box 2, box 3); + let mut vec = vec!(box 1i, box 2, box 3); let vec: &mut [Box<int>] = vec.as_mut_slice(); match vec { [_a, //~ ERROR cannot move out @@ -47,7 +47,7 @@ fn c() { } fn d() { - let mut vec = vec!(box 1, box 2, box 3); + let mut vec = vec!(box 1i, box 2, box 3); let vec: &mut [Box<int>] = vec.as_mut_slice(); match vec { [.._a, //~ ERROR cannot move out @@ -58,7 +58,7 @@ fn d() { } fn e() { - let mut vec = vec!(box 1, box 2, box 3); + let mut vec = vec!(box 1i, box 2, box 3); let vec: &mut [Box<int>] = vec.as_mut_slice(); match vec { [_a, _b, _c] => {} //~ ERROR cannot move out diff --git a/src/test/compile-fail/borrowck-while.rs b/src/test/compile-fail/borrowck-while.rs index b904fd53d72..b5703e56642 100644 --- a/src/test/compile-fail/borrowck-while.rs +++ b/src/test/compile-fail/borrowck-while.rs @@ -10,7 +10,7 @@ fn f() -> int { let mut x: int; - while 1 == 1 { x = 10; } + while 1i == 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 0d5a71559e8..bea025df6fc 100644 --- a/src/test/compile-fail/builtin-superkinds-self-type.rs +++ b/src/test/compile-fail/builtin-superkinds-self-type.rs @@ -21,6 +21,6 @@ impl <T: Share> Foo for T { } fn main() { let (tx, rx) = channel(); - 1193182.foo(tx); - assert!(rx.recv() == 1193182); + 1193182i.foo(tx); + assert!(rx.recv() == 1193182i); } 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 ace917c704a..d8f771cfb5a 100644 --- a/src/test/compile-fail/const-block-non-item-statement.rs +++ b/src/test/compile-fail/const-block-non-item-statement.rs @@ -10,7 +10,7 @@ #![feature(macro_rules)] -static A: uint = { 1; 2 }; +static A: uint = { 1u; 2 }; //~^ ERROR: blocks in constants are limited to items and tail expressions static B: uint = { { } 2 }; @@ -21,7 +21,7 @@ macro_rules! foo { } static C: uint = { foo!() 2 }; -static D: uint = { let x = 4; 2 }; +static D: uint = { let x = 4u; 2 }; //~^ ERROR: blocks in constants are limited to items and tail expressions pub fn main() { 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 8b00b614909..8de613ac03d 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 - &1 //~ ERROR refutable pattern in `for` loop binding - in [1].iter() {} + &1i //~ ERROR refutable pattern in `for` loop binding + in [1i].iter() {} } diff --git a/src/test/compile-fail/integer-literal-suffix-inference-2.rs b/src/test/compile-fail/integer-literal-suffix-inference-2.rs new file mode 100644 index 00000000000..7c862d04d20 --- /dev/null +++ b/src/test/compile-fail/integer-literal-suffix-inference-2.rs @@ -0,0 +1,17 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn foo(_: *const ()) {} + +fn main() { + let a = 3; //~ ERROR cannot determine a type for this local variable + foo(&a as *const _ as *const ()); +} + diff --git a/src/test/compile-fail/integer-literal-suffix-inference-3.rs b/src/test/compile-fail/integer-literal-suffix-inference-3.rs new file mode 100644 index 00000000000..dc3db985660 --- /dev/null +++ b/src/test/compile-fail/integer-literal-suffix-inference-3.rs @@ -0,0 +1,15 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + println!("{}", std::mem::size_of_val(&1)); + //~^ ERROR cannot determine a type for this expression +} + diff --git a/src/test/compile-fail/issue-10398.rs b/src/test/compile-fail/issue-10398.rs index 97642377ba8..9141ab669bb 100644 --- a/src/test/compile-fail/issue-10398.rs +++ b/src/test/compile-fail/issue-10398.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let x = box 1; + let x = box 1i; let f: proc() = proc() { let _a = x; drop(x); diff --git a/src/test/compile-fail/issue-11493.rs b/src/test/compile-fail/issue-11493.rs index 333ff7118d4..7856a5dcf7f 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(3); - let y = x.as_ref().unwrap_or(&5); //~ ERROR: borrowed value does not live long enough + let x = Some(3i); + let y = x.as_ref().unwrap_or(&5i); //~ ERROR: borrowed value does not live long enough } diff --git a/src/test/compile-fail/issue-11873.rs b/src/test/compile-fail/issue-11873.rs index 0ca326c1e0d..e1acab4008a 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!(1); - let f = || v.push(2); + let mut v = vec!(1i); + let f = || v.push(2i); 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 a8d2c7509ce..5d62c25ea17 100644 --- a/src/test/compile-fail/issue-11925.rs +++ b/src/test/compile-fail/issue-11925.rs @@ -10,7 +10,7 @@ fn main() { let r = { - let x = box 42; + let x = box 42i; let f = proc() &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 9ad59367312..f824a06aed1 100644 --- a/src/test/compile-fail/issue-12041.rs +++ b/src/test/compile-fail/issue-12041.rs @@ -14,7 +14,7 @@ fn main() { loop { let tx = tx; //~^ ERROR: use of moved value: `tx` - tx.send(1); + tx.send(1i); } }); } diff --git a/src/test/compile-fail/issue-1962.rs b/src/test/compile-fail/issue-1962.rs index db3e9c23b76..c59ee328eff 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 = 0; + let mut i = 0i; while true { //~ ERROR denote infinite loops with loop - i += 1; - if i == 5 { break; } + i += 1i; + if i == 5i { break; } } } diff --git a/src/test/compile-fail/issue-3707.rs b/src/test/compile-fail/issue-3707.rs index 4e128b63e92..2445638d62e 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 1+1 == 2 + return 1i+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(); - 1 + 1; + 1i + 1; } diff --git a/src/test/compile-fail/lint-dead-code-1.rs b/src/test/compile-fail/lint-dead-code-1.rs index f8e59ad13ad..8417f7810ea 100644 --- a/src/test/compile-fail/lint-dead-code-1.rs +++ b/src/test/compile-fail/lint-dead-code-1.rs @@ -35,7 +35,7 @@ static priv_static: int = 0; //~ ERROR: code is never used static used_static: int = 0; pub static used_static2: int = used_static; static USED_STATIC: int = 0; -static STATIC_USED_IN_ENUM_DISCRIMINANT: uint = 10; +static STATIC_USED_IN_ENUM_DISCRIMINANT: int = 10; pub type typ = *const UsedStruct4; pub struct PubStruct; @@ -77,7 +77,7 @@ pub fn pub_fn() { let e = foo3; SemiUsedStruct::la_la_la(); - let i = 1; + let i = 1i; match i { USED_STATIC => (), _ => () diff --git a/src/test/compile-fail/lint-heap-memory.rs b/src/test/compile-fail/lint-heap-memory.rs index 2ec9efe9498..8f495645dc7 100644 --- a/src/test/compile-fail/lint-heap-memory.rs +++ b/src/test/compile-fail/lint-heap-memory.rs @@ -21,11 +21,11 @@ struct Foo { struct Bar { x: Box<int> } //~ ERROR type uses owned fn main() { - let _x : Bar = Bar {x : box 10}; //~ ERROR type uses owned + let _x : Bar = Bar {x : box 10i}; //~ ERROR type uses owned - box(GC) 2; //~ ERROR type uses managed + box(GC) 2i; //~ ERROR type uses managed - box 2; //~ ERROR type uses owned + box 2i; //~ ERROR type uses owned fn g(_: Box<Clone>) {} //~ ERROR type uses owned proc() {}; //~ ERROR type uses owned } diff --git a/src/test/compile-fail/lint-unnecessary-parens.rs b/src/test/compile-fail/lint-unnecessary-parens.rs index 4d9383aeda2..d51d5b4af87 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() -> int { - return (1); //~ ERROR unnecessary parentheses around `return` value + return (1i); //~ ERROR unnecessary parentheses around `return` value } fn bar() -> X { return (X { y: true }); //~ ERROR unnecessary parentheses around `return` value @@ -45,7 +45,7 @@ fn main() { _ => {} } - let mut _a = (0); //~ ERROR unnecessary parentheses around assigned value - _a = (0); //~ ERROR unnecessary parentheses around assigned value - _a += (1); //~ ERROR unnecessary parentheses around assigned value + 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 } diff --git a/src/test/compile-fail/lint-unused-imports.rs b/src/test/compile-fail/lint-unused-imports.rs index 4334d2f63ea..f03e748e417 100644 --- a/src/test/compile-fail/lint-unused-imports.rs +++ b/src/test/compile-fail/lint-unused-imports.rs @@ -55,7 +55,7 @@ mod bar { pub mod c { use foo::Point; use foo::Square; //~ ERROR unused import - pub fn cc(p: Point) -> int { return 2 * (p.x + p.y); } + pub fn cc(p: Point) -> int { return 2i * (p.x + p.y); } } #[allow(unused_imports)] @@ -66,8 +66,8 @@ mod bar { fn main() { cal(foo::Point{x:3, y:9}); - let mut a = 3; - let mut b = 4; + let mut a = 3i; + let mut b = 4i; 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 d5f34669a25..c5281bf6781 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 = 3; //~ ERROR: variable does not need to be mutable - let mut a = 2; //~ ERROR: variable does not need to be mutable - let mut b = 3; //~ ERROR: variable does not need to be mutable - let mut a = vec!(3); //~ ERROR: variable does not need to be mutable - let (mut a, b) = (1, 2); //~ ERROR: variable does not need to be mutable + 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 - match 30 { + match 30i { mut x => {} //~ ERROR: variable does not need to be mutable } - match (30, 2) { + match (30i, 2i) { (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: int| 10; //~ ERROR: variable does not need to be mutable + let x = |mut y: int| 10i; //~ ERROR: variable does not need to be mutable fn what(mut foo: int) {} //~ ERROR: variable does not need to be mutable // positive cases - let mut a = 2; - a = 3; + let mut a = 2i; + a = 3i; let mut a = Vec::new(); - a.push(3); + a.push(3i); let mut a = Vec::new(); callback(|| { - a.push(3); + a.push(3i); }); - let (mut a, b) = (1, 2); + let (mut a, b) = (1i, 2i); a = 34; - match 30 { + match 30i { mut x => { - x = 21; + x = 21i; } } - match (30, 2) { + match (30i, 2i) { (mut x, 1) | (mut x, 2) | (mut x, 3) => { @@ -65,12 +65,12 @@ fn main() { _ => {} } - let x = |mut y: int| y = 32; - fn nothing(mut foo: int) { foo = 37; } + let x = |mut y: int| y = 32i; + fn nothing(mut foo: int) { foo = 37i; } // leading underscore should avoid the warning, just like the // unused variable lint. - let mut _allowed = 1; + let mut _allowed = 1i; } fn callback(f: ||) {} @@ -78,6 +78,6 @@ fn callback(f: ||) {} // make sure the lint attribute can be turned off #[allow(unused_mut)] fn foo(mut a: int) { - let mut a = 3; - let mut b = vec!(2); + let mut a = 3i; + let mut b = vec!(2i); } diff --git a/src/test/compile-fail/liveness-unused.rs b/src/test/compile-fail/liveness-unused.rs index ee44872d122..68dbacaae5c 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 = 3; + let x = 3i; //~^ ERROR unused variable: `x` } fn f3() { - let mut x = 3; + let mut x = 3i; //~^ ERROR variable `x` is assigned to, but never used - x += 4; + x += 4i; //~^ ERROR value assigned to `x` is never read } fn f3b() { - let mut z = 3; + let mut z = 3i; //~^ ERROR variable `z` is assigned to, but never used loop { - z += 4; + z += 4i; } } #[allow(unused_variable)] fn f3c() { - let mut z = 3; - loop { z += 4; } + let mut z = 3i; + loop { z += 4i; } } #[allow(unused_variable)] #[allow(dead_assignment)] fn f3d() { - let mut x = 3; - x += 4; + let mut x = 3i; + x += 4i; } fn f4() { - match Some(3) { + match Some(3i) { Some(i) => { //~^ ERROR unused variable: `i` } @@ -75,7 +75,7 @@ enum tri { } fn f4b() -> int { - match a(3) { + match a(3i) { a(i) | b(i) | c(i) => { i } diff --git a/src/test/compile-fail/match-ill-type2.rs b/src/test/compile-fail/match-ill-type2.rs index d8d665e2af6..17f02abc8ec 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 1 { - 1 => 1, //~ ERROR mismatched types between arms - 2u => 1, - _ => 2, + match 1i { + 1i => 1i, + 2u => 1i, //~ ERROR mismatched types + _ => 2i, }; } diff --git a/src/test/compile-fail/match-non-exhaustive.rs b/src/test/compile-fail/match-non-exhaustive.rs index a24d2ed4b7f..20adbeebdf1 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 0 { 1 => () } //~ ERROR non-exhaustive patterns - match 0 { 0 if false => () } //~ ERROR non-exhaustive patterns + match 0i { 1i => () } //~ ERROR non-exhaustive patterns + match 0i { 0i 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 3f484511859..7c9c371c526 100644 --- a/src/test/compile-fail/match-range-fail-dominate.rs +++ b/src/test/compile-fail/match-range-fail-dominate.rs @@ -39,9 +39,9 @@ fn main() { _ => {} }; - match 1.0 { - 0.01 .. 6.5 => {} - 0.02 => {} + match 1.0f64 { + 0.01f64 .. 6.5f64 => {} + 0.02f64 => {} _ => {} }; } diff --git a/src/test/compile-fail/match-vec-fixed.rs b/src/test/compile-fail/match-vec-fixed.rs index e778dd18e68..bac9fef2b17 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 = [1, 2, 3]; + let v = [1i, 2, 3]; match v { [_, _, _] => {} [_, _, _] => {} //~ ERROR unreachable pattern 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 82aa5c36c8e..7a882b26db5 100644 --- a/src/test/compile-fail/moves-based-on-type-exprs.rs +++ b/src/test/compile-fail/moves-based-on-type-exprs.rs @@ -25,13 +25,13 @@ fn f10() { fn f20() { let x = "hi".to_string(); - let _y = (x, 3); + let _y = (x, 3i); touch(&x); //~ ERROR use of moved value: `x` } fn f21() { - let x = vec!(1, 2, 3); - let _y = (*x.get(0), 3); + let x = vec!(1i, 2, 3); + let _y = (*x.get(0), 3i); touch(&x); } @@ -62,9 +62,9 @@ fn f50(cond: bool) { let x = "hi".to_string(); let y = "ho".to_string(); let _y = match cond { - _ if guard(x) => 10, - true => 10, - false => 20, + _ if guard(x) => 10i, + true => 10i, + false => 20i, }; 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 99d7258477a..ce6e793d55d 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(0); + let m = RefCell::new(0i); 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-not-freeze.rs b/src/test/compile-fail/mut-not-freeze.rs index f1e7ef216c3..985bfec392c 100644 --- a/src/test/compile-fail/mut-not-freeze.rs +++ b/src/test/compile-fail/mut-not-freeze.rs @@ -13,6 +13,6 @@ use std::cell::RefCell; fn f<T: Share>(_: T) {} fn main() { - let x = RefCell::new(0); + let x = RefCell::new(0i); f(x); //~ ERROR: which does not fulfill `Share` } 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 8e968d90a2f..e269a736ce2 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(0); + let m = RefCell::new(0i); let p; { let b = m.borrow(); diff --git a/src/test/compile-fail/no_send-rc.rs b/src/test/compile-fail/no_send-rc.rs index bf79d1393b8..291340e55b8 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(5); + let x = Rc::new(5i); bar(x); //~^ ERROR instantiating a type parameter with an incompatible type `alloc::rc::Rc<int>`, // which does not fulfill `Send` diff --git a/src/test/compile-fail/no_share-rc.rs b/src/test/compile-fail/no_share-rc.rs index ad79d038212..f49592b1735 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: Share>(_: T) {} fn main() { - let x = Rc::new(RefCell::new(5)); + let x = Rc::new(RefCell::new(5i)); bar(x); //~^ ERROR instantiating a type parameter with an incompatible type // `std::rc::Rc<std::cell::RefCell<int>>`, which does not fulfill `Share` diff --git a/src/test/compile-fail/non-exhaustive-match.rs b/src/test/compile-fail/non-exhaustive-match.rs index cd78419439a..4de4af87712 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(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered + match Some(10i) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered None => {} } - match (2, 3, 4) { //~ ERROR non-exhaustive patterns: `(_, _, _)` not covered + match (2i, 3i, 4i) { //~ ERROR non-exhaustive patterns: `(_, _, _)` not covered (_, _, 4) => {} } match (a, a) { //~ ERROR non-exhaustive patterns: `(a, a)` not covered @@ -35,20 +35,20 @@ fn main() { (_, a) => {} (b, b) => {} } - let vec = vec!(Some(42), None, Some(21)); + let vec = vec!(Some(42i), None, Some(21i)); let vec: &[Option<int>] = vec.as_slice(); match vec { //~ ERROR non-exhaustive patterns: `[]` not covered [Some(..), None, ..tail] => {} [Some(..), Some(..), ..tail] => {} [None] => {} } - let vec = vec!(1); + let vec = vec!(1i); let vec: &[int] = vec.as_slice(); match vec { [_, ..tail] => (), [] => () } - let vec = vec!(0.5); + let vec = vec!(0.5f32); let vec: &[f32] = vec.as_slice(); match vec { //~ ERROR non-exhaustive patterns: `[_, _, _, _]` not covered [0.1, 0.2, 0.3] => (), @@ -56,7 +56,7 @@ fn main() { [0.1] => (), [] => () } - let vec = vec!(Some(42), None, Some(21)); + let vec = vec!(Some(42i), None, Some(21i)); let vec: &[Option<int>] = vec.as_slice(); match vec { [Some(..), None, ..tail] => {} diff --git a/src/test/compile-fail/refutable-pattern-errors.rs b/src/test/compile-fail/refutable-pattern-errors.rs index 9128ee68e26..28533518a25 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)): (int, (Option<int>, int))) { } //~^ ERROR refutable pattern in function argument: `(_, _)` not covered fn main() { - let (1, (Some(1), 2..3)) = (1, (None, 2)); + let (1i, (Some(1i), 2i..3i)) = (1i, (None, 2i)); //~^ ERROR refutable pattern in local binding: `(_, _)` not covered } diff --git a/src/test/compile-fail/regionck-closure-lifetimes.rs b/src/test/compile-fail/regionck-closure-lifetimes.rs index 731b045d0f3..846e03d57c3 100644 --- a/src/test/compile-fail/regionck-closure-lifetimes.rs +++ b/src/test/compile-fail/regionck-closure-lifetimes.rs @@ -13,9 +13,9 @@ fn env<'a>(blk: |p: ||: 'a|) { // the lifetime `'a`, which outlives the current // block. - let mut state = 0; + let mut state = 0i; let statep = &mut state; - blk(|| *statep = 1); //~ ERROR cannot infer + blk(|| *statep = 1i); //~ ERROR cannot infer } fn no_env_no_for<'a>(blk: |p: |||: 'a) { @@ -31,7 +31,7 @@ fn repeating_loop() { // external to the loop. let closure; - let state = 0; + let state = 0i; loop { closure = || state; //~ ERROR cannot infer @@ -47,7 +47,7 @@ fn repeating_while() { // external to the loop. let closure; - let state = 0; + let state = 0i; while true { closure = || state; //~ ERROR cannot infer 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 f588655d1af..472df87dd2b 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 = 3; + let x = 3i; // 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 = 1 + *p; + let x = 1i + *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 89350f16167..22c6bdd2d50 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 = 3; + let mut x = 3i; 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/static-assert2.rs b/src/test/compile-fail/static-assert2.rs index d5e70205e95..6adc3b0aaf8 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 = 1 == 2; //~ ERROR static assertion failed +static E: bool = 1i == 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 997003a28d4..c410e856552 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 4 { + match 4i { a => {} _ => {} //~ ERROR: unreachable pattern } diff --git a/src/test/compile-fail/static-region-bound.rs b/src/test/compile-fail/static-region-bound.rs index 880fbf0cb1d..d78643ccd10 100644 --- a/src/test/compile-fail/static-region-bound.rs +++ b/src/test/compile-fail/static-region-bound.rs @@ -15,8 +15,8 @@ use std::gc::GC; fn f<T:'static>(_: T) {} fn main() { - let x = box(GC) 3; + let x = box(GC) 3i; f(x); - let x = &3; + let x = &3i; f(x); //~ ERROR instantiating a type parameter with an incompatible type } diff --git a/src/test/compile-fail/typeck-unsafe-always-share.rs b/src/test/compile-fail/typeck-unsafe-always-share.rs index 6dec86ddf62..72ef4a03eab 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: Share>(s: T){ } fn main() { - let us = Unsafe::new(MyShare{u: Unsafe::new(0)}); + let us = Unsafe::new(MyShare{u: Unsafe::new(0i)}); test(us); let uns = Unsafe::new(NoShare{m: marker::NoShare}); diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index e8dc0fc3b6c..67fbc08bd94 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -16,6 +16,6 @@ fn f<T:Send>(_i: T) { } fn main() { - let i = box box(GC) 100; + let i = box box(GC) 100i; f(i); //~ ERROR does not fulfill `Send` } diff --git a/src/test/compile-fail/unreachable-code.rs b/src/test/compile-fail/unreachable-code.rs index 96adb29cbc8..fb9a6b52018 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 = 3; //~ ERROR: unreachable statement + let a = 3i; //~ ERROR: unreachable statement } diff --git a/src/test/compile-fail/unsized3.rs b/src/test/compile-fail/unsized3.rs index c321871c40f..c5cc7e8f716 100644 --- a/src/test/compile-fail/unsized3.rs +++ b/src/test/compile-fail/unsized3.rs @@ -51,8 +51,8 @@ fn f8<type X>(x1: &S<X>, x2: &S<X>) { // Test some tuples. fn f9<type X>(x1: Box<S<X>>, x2: Box<E<X>>) { - f5(&(*x1, 34)); //~ERROR instantiating a type parameter with an incompatible type `(S<X>,int)`, - f5(&(32, *x2)); //~ERROR instantiating a type parameter with an incompatible type `(int,E<X>)`, + f5(&(*x1, 34i)); //~ERROR instantiating a type parameter with an incompatible type `(S<X>,int)`, + f5(&(32i, *x2)); //~ERROR instantiating a type parameter with an incompatible type `(int,E<X>)`, } // I would like these to fail eventually. diff --git a/src/test/compile-fail/unsized6.rs b/src/test/compile-fail/unsized6.rs index 9916fdba20f..061b003b5e3 100644 --- a/src/test/compile-fail/unsized6.rs +++ b/src/test/compile-fail/unsized6.rs @@ -29,12 +29,12 @@ fn f2<type X: T>(x: &X) { fn f3<type X>(x1: Box<X>, x2: Box<X>, x3: Box<X>) { let y: X = *x1; //~ERROR variable `y` has dynamically sized type `X` let y = *x2; //~ERROR variable `y` has dynamically sized type `X` - let (y, z) = (*x3, 4); //~ERROR variable `y` has dynamically sized type `X` + let (y, z) = (*x3, 4i); //~ERROR variable `y` has dynamically sized type `X` } fn f4<type X: T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) { let y: X = *x1; //~ERROR variable `y` has dynamically sized type `X` let y = *x2; //~ERROR variable `y` has dynamically sized type `X` - let (y, z) = (*x3, 4); //~ERROR variable `y` has dynamically sized type `X` + let (y, z) = (*x3, 4i); //~ERROR variable `y` has dynamically sized type `X` } fn g1<type X>(x: X) {} //~ERROR variable `x` has dynamically sized type `X` diff --git a/src/test/compile-fail/vec-mut-iter-borrow.rs b/src/test/compile-fail/vec-mut-iter-borrow.rs index a3c7fc2d4c8..9a179f434c2 100644 --- a/src/test/compile-fail/vec-mut-iter-borrow.rs +++ b/src/test/compile-fail/vec-mut-iter-borrow.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let mut xs = vec!(1, 2, 3, 4); + let mut xs = vec!(1i, 2, 3, 4); for x in xs.mut_iter() { xs.push(1) //~ ERROR cannot borrow `xs` diff --git a/src/test/compile-fail/warn-path-statement.rs b/src/test/compile-fail/warn-path-statement.rs index 90515807ac6..8b6d160a6c5 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 = 10; + let x = 10i; x; //~ ERROR path statement with no effect } diff --git a/src/test/debuginfo/basic-types-metadata.rs b/src/test/debuginfo/basic-types-metadata.rs index da32518d993..51d2f36cc78 100644 --- a/src/test/debuginfo/basic-types-metadata.rs +++ b/src/test/debuginfo/basic-types-metadata.rs @@ -67,7 +67,7 @@ fn main() { let f32: f32 = 2.5; let f64: f64 = 3.5; _zzz(); - if 1 == 1 { _yyy(); } + if 1i == 1 { _yyy(); } } fn _zzz() {()} diff --git a/src/test/debuginfo/box.rs b/src/test/debuginfo/box.rs index 01129c845e9..dcfe1804510 100644 --- a/src/test/debuginfo/box.rs +++ b/src/test/debuginfo/box.rs @@ -30,9 +30,9 @@ use std::gc::GC; fn main() { - let a = box 1; - let b = box() (2, 3.5); - let c = box(GC) 4; + let a = box 1i; + let b = box() (2i, 3.5f64); + let c = box(GC) 4i; let d = box(GC) false; _zzz(); } diff --git a/src/test/debuginfo/closure-in-generic-function.rs b/src/test/debuginfo/closure-in-generic-function.rs index 7a89b682d15..cc241040f2b 100644 --- a/src/test/debuginfo/closure-in-generic-function.rs +++ b/src/test/debuginfo/closure-in-generic-function.rs @@ -39,8 +39,8 @@ fn some_generic_fun<T1, T2>(a: T1, b: T2) -> (T2, T1) { } fn main() { - some_generic_fun(0.5, 10); - some_generic_fun(&29, box 110); + some_generic_fun(0.5f64, 10i); + some_generic_fun(&29i, box 110i); } fn zzz() {()} diff --git a/src/test/debuginfo/destructured-local.rs b/src/test/debuginfo/destructured-local.rs index c543a11475e..d91d98f4305 100644 --- a/src/test/debuginfo/destructured-local.rs +++ b/src/test/debuginfo/destructured-local.rs @@ -156,7 +156,7 @@ fn main() { let Struct { a: k, b: l } = Struct { a: 12, b: 13 }; // ignored tuple element - let (m, _, n) = (14, 15, 16); + let (m, _, n) = (14i, 15i, 16i); // ignored struct field let Struct { b: o, .. } = Struct { a: 17, b: 18 }; @@ -169,25 +169,25 @@ fn main() { // complex nesting let ((u, v), ((w, (x, Struct { a: y, b: z})), Struct { a: ae, b: oe }), ue) = - ((25, 26), ((27, (28, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33); + ((25i, 26i), ((27i, (28i, Struct { a: 29, b: 30})), Struct { a: 31, b: 32 }), 33i); // reference - let &aa = &(34, 35); + let &aa = &(34i, 35i); // reference - let &bb = &(36, 37); + let &bb = &(36i, 37i); // contained reference - let (&cc, _) = (&38, 39); + let (&cc, _) = (&38i, 39i); // unique pointer - let box dd = box() (40, 41, 42); + let box dd = box() (40i, 41i, 42i); // ref binding - let ref ee = (43, 44, 45); + let ref ee = (43i, 44i, 45i); // ref binding in tuple - let (ref ff, gg) = (46, (47, 48)); + let (ref ff, gg) = (46i, (47i, 48i)); // ref binding in struct let Struct { b: ref hh, .. } = Struct { a: 49, b: 50 }; diff --git a/src/test/debuginfo/function-arg-initialization.rs b/src/test/debuginfo/function-arg-initialization.rs index d439f49fe69..535efa0b84e 100644 --- a/src/test/debuginfo/function-arg-initialization.rs +++ b/src/test/debuginfo/function-arg-initialization.rs @@ -155,7 +155,7 @@ fn non_immediate_args(a: BigStruct, b: BigStruct) { } fn binding(a: i64, b: u64, c: f64) { - let x = 0; + let x = 0i; } fn assignment(mut a: u64, b: u64, c: f64) { diff --git a/src/test/debuginfo/function-prologue-stepping-no-split-stack.rs b/src/test/debuginfo/function-prologue-stepping-no-split-stack.rs index a9ccf3cdb16..0160a6f1879 100644 --- a/src/test/debuginfo/function-prologue-stepping-no-split-stack.rs +++ b/src/test/debuginfo/function-prologue-stepping-no-split-stack.rs @@ -152,7 +152,7 @@ fn non_immediate_args(a: BigStruct, b: BigStruct) { #[no_split_stack] fn binding(a: i64, b: u64, c: f64) { - let x = 0; + let x = 0i; } #[no_split_stack] diff --git a/src/test/debuginfo/generic-functions-nested.rs b/src/test/debuginfo/generic-functions-nested.rs index d9b20a84cdd..1805405dc1e 100644 --- a/src/test/debuginfo/generic-functions-nested.rs +++ b/src/test/debuginfo/generic-functions-nested.rs @@ -43,8 +43,8 @@ // gdb-command:continue fn outer<TA: Clone>(a: TA) { - inner(a.clone(), 1); - inner(a.clone(), 2.5); + inner(a.clone(), 1i); + inner(a.clone(), 2.5f64); fn inner<TX, TY>(x: TX, y: TY) { zzz(); diff --git a/src/test/debuginfo/generic-method-on-generic-struct.rs b/src/test/debuginfo/generic-method-on-generic-struct.rs index ad088d9a5eb..9ed1c0175a9 100644 --- a/src/test/debuginfo/generic-method-on-generic-struct.rs +++ b/src/test/debuginfo/generic-method-on-generic-struct.rs @@ -91,7 +91,7 @@ fn main() { let _ = stack.self_by_ref(-1, -2_i8); let _ = stack.self_by_val(-3, -4_i16); - let owned = box Struct { x: 1234.5 }; + let owned = box Struct { x: 1234.5f64 }; let _ = owned.self_by_ref(-5, -6_i32); let _ = owned.self_by_val(-7, -8_i64); let _ = owned.self_owned(-9, -10.5_f32); diff --git a/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs b/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs index 82a9d708966..b62b6f186b9 100644 --- a/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs +++ b/src/test/debuginfo/generic-static-method-on-struct-and-enum.rs @@ -61,8 +61,8 @@ impl Enum { } fn main() { - Struct::static_method(1, 2); - Enum::static_method(-3, 4.5, 5); + Struct::static_method(1i, 2i); + Enum::static_method(-3i, 4.5f64, 5i); } fn zzz() {()} diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs index eddf4dfd755..7fec116b8e5 100644 --- a/src/test/debuginfo/generic-struct-style-enum.rs +++ b/src/test/debuginfo/generic-struct-style-enum.rs @@ -72,7 +72,7 @@ fn main() { // 0b01011001 = 89 let case3: Regular<u16, i32, u64> = Case3 { a: 0, b: 6438275382588823897 }; - let univariant = TheOnlyCase { a: -1 }; + let univariant = TheOnlyCase { a: -1i }; zzz(); } diff --git a/src/test/debuginfo/generic-struct.rs b/src/test/debuginfo/generic-struct.rs index 69217f4b878..a2c5a0973fc 100644 --- a/src/test/debuginfo/generic-struct.rs +++ b/src/test/debuginfo/generic-struct.rs @@ -31,10 +31,13 @@ struct AGenericStruct<TKey, TValue> { fn main() { - let int_int = AGenericStruct { key: 0, value: 1 }; - let int_float = AGenericStruct { key: 2, value: 3.5 }; - let float_int = AGenericStruct { key: 4.5, value: 5 }; - let float_int_float = AGenericStruct { key: 6.5, value: AGenericStruct { key: 7, value: 8.5 } }; + let int_int = AGenericStruct { key: 0i, value: 1i }; + let int_float = AGenericStruct { key: 2i, value: 3.5f64 }; + let float_int = AGenericStruct { key: 4.5f64, value: 5i }; + let float_int_float = AGenericStruct { + key: 6.5f64, + value: AGenericStruct { key: 7i, value: 8.5f64 }, + }; zzz(); } diff --git a/src/test/debuginfo/lexical-scope-in-for-loop.rs b/src/test/debuginfo/lexical-scope-in-for-loop.rs index 0f6ac953179..0fb823a74cc 100644 --- a/src/test/debuginfo/lexical-scope-in-for-loop.rs +++ b/src/test/debuginfo/lexical-scope-in-for-loop.rs @@ -55,15 +55,15 @@ fn main() { - let range = [1, 2, 3]; + let range = [1i, 2, 3]; - let x = 1000000; // wan meeeljen doollaars! + let x = 1000000i; // wan meeeljen doollaars! for &x in range.iter() { zzz(); sentinel(); - let x = -1 * x; + let x = -1i * x; zzz(); sentinel(); diff --git a/src/test/debuginfo/lexical-scope-in-if.rs b/src/test/debuginfo/lexical-scope-in-if.rs index ef573735d0d..6018e62af00 100644 --- a/src/test/debuginfo/lexical-scope-in-if.rs +++ b/src/test/debuginfo/lexical-scope-in-if.rs @@ -80,8 +80,8 @@ fn main() { - let x = 999; - let y = -1; + let x = 999i; + let y = -1i; zzz(); sentinel(); @@ -90,13 +90,13 @@ fn main() { zzz(); sentinel(); - let x = 1001; + let x = 1001i; zzz(); sentinel(); - let x = 1002; - let y = 1003; + let x = 1002i; + let y = 1003i; zzz(); sentinel(); } else { @@ -112,8 +112,8 @@ fn main() { zzz(); sentinel(); - let x = 1004; - let y = 1005; + let x = 1004i; + let y = 1005i; zzz(); sentinel(); } diff --git a/src/test/debuginfo/lexical-scope-in-match.rs b/src/test/debuginfo/lexical-scope-in-match.rs index b347afbbbcd..7bec677e4b1 100644 --- a/src/test/debuginfo/lexical-scope-in-match.rs +++ b/src/test/debuginfo/lexical-scope-in-match.rs @@ -81,13 +81,13 @@ struct Struct { fn main() { - let shadowed = 231; - let not_shadowed = 232; + let shadowed = 231i; + let not_shadowed = 232i; zzz(); sentinel(); - match (233, 234) { + match (233i, 234i) { (shadowed, local_to_arm) => { zzz(); @@ -95,7 +95,7 @@ fn main() { } } - match (235, 236) { + match (235i, 236i) { // with literal (235, shadowed) => { @@ -132,7 +132,7 @@ fn main() { _ => {} } - match (243, 244) { + match (243i, 244i) { (shadowed, ref local_to_arm) => { zzz(); diff --git a/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs b/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs index ad8f04d1fc7..0e47f2c9921 100644 --- a/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs +++ b/src/test/debuginfo/lexical-scope-in-parameterless-closure.rs @@ -16,6 +16,6 @@ // Nothing to do here really, just make sure it compiles. See issue #8513. fn main() { let _ = ||(); - let _ = range(1u,3).map(|_| 5); + let _ = range(1u,3).map(|_| 5i); } diff --git a/src/test/debuginfo/lexical-scope-in-stack-closure.rs b/src/test/debuginfo/lexical-scope-in-stack-closure.rs index c56cdbe0315..0168eaa86c2 100644 --- a/src/test/debuginfo/lexical-scope-in-stack-closure.rs +++ b/src/test/debuginfo/lexical-scope-in-stack-closure.rs @@ -55,7 +55,7 @@ fn main() { zzz(); sentinel(); - let x = 2.5; + let x = 2.5f64; zzz(); sentinel(); diff --git a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs index 12e95c4f9c7..48edd7ae12a 100644 --- a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs +++ b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs @@ -84,7 +84,7 @@ fn main() { - let mut x = 0; + let mut x = 0i; loop { if x >= 2 { @@ -108,7 +108,7 @@ fn main() { zzz(); sentinel(); - let x = -987; + let x = -987i; zzz(); sentinel(); diff --git a/src/test/debuginfo/lexical-scope-in-unique-closure.rs b/src/test/debuginfo/lexical-scope-in-unique-closure.rs index 328910b0f13..ce3b2a530e2 100644 --- a/src/test/debuginfo/lexical-scope-in-unique-closure.rs +++ b/src/test/debuginfo/lexical-scope-in-unique-closure.rs @@ -55,7 +55,7 @@ fn main() { zzz(); sentinel(); - let x = 2.5; + let x = 2.5f64; zzz(); sentinel(); diff --git a/src/test/debuginfo/lexical-scope-in-while.rs b/src/test/debuginfo/lexical-scope-in-while.rs index 1b2a9f75182..d726eb6581e 100644 --- a/src/test/debuginfo/lexical-scope-in-while.rs +++ b/src/test/debuginfo/lexical-scope-in-while.rs @@ -84,7 +84,7 @@ fn main() { - let mut x = 0; + let mut x = 0i; while x < 2 { zzz(); @@ -104,7 +104,7 @@ fn main() { zzz(); sentinel(); - let x = -987; + let x = -987i; zzz(); sentinel(); diff --git a/src/test/debuginfo/lexical-scope-with-macro.rs b/src/test/debuginfo/lexical-scope-with-macro.rs index 3fb6f10fe33..e55271239d4 100644 --- a/src/test/debuginfo/lexical-scope-with-macro.rs +++ b/src/test/debuginfo/lexical-scope-with-macro.rs @@ -77,7 +77,7 @@ macro_rules! no_new_scope( macro_rules! new_scope( () => ({ - let a = 890242; + let a = 890242i; zzz(); sentinel(); }) @@ -105,8 +105,8 @@ macro_rules! dup_expr( fn main() { - let a = trivial!(10); - let b = no_new_scope!(33); + let a = trivial!(10i); + let b = no_new_scope!(33i); zzz(); sentinel(); @@ -116,12 +116,12 @@ fn main() { zzz(); sentinel(); - shadow_within_macro!(100); + shadow_within_macro!(100i); zzz(); sentinel(); - let c = dup_expr!(10 * 20); + let c = dup_expr!(10i * 20); zzz(); sentinel(); diff --git a/src/test/debuginfo/lexical-scopes-in-block-expression.rs b/src/test/debuginfo/lexical-scopes-in-block-expression.rs index 41b88dc3e98..2a9969dc6e9 100644 --- a/src/test/debuginfo/lexical-scopes-in-block-expression.rs +++ b/src/test/debuginfo/lexical-scopes-in-block-expression.rs @@ -227,8 +227,8 @@ fn a_function(x: int) -> int { fn main() { - let val = -1; - let ten = 10; + let val = -1i; + let ten = 10i; // surrounded by struct expression let point = Point { @@ -280,7 +280,7 @@ fn main() { sentinel(); val - }, 0); + }, 0i); zzz(); sentinel(); @@ -355,7 +355,7 @@ fn main() { sentinel(); // index expression - let a_vector = [10, ..20]; + let a_vector = [10i, ..20]; let _ = a_vector[{ zzz(); sentinel(); diff --git a/src/test/debuginfo/limited-debuginfo.rs b/src/test/debuginfo/limited-debuginfo.rs index 616f312c078..9cda2c45131 100644 --- a/src/test/debuginfo/limited-debuginfo.rs +++ b/src/test/debuginfo/limited-debuginfo.rs @@ -46,7 +46,7 @@ fn zzz() {()} fn some_function(a: int, b: int) { let some_variable = Struct { a: 11, b: 22 }; - let some_other_variable = 23; + let some_other_variable = 23i; zzz(); } diff --git a/src/test/debuginfo/managed-pointer-within-unique.rs b/src/test/debuginfo/managed-pointer-within-unique.rs index b56db2d1846..cc18ea64f38 100644 --- a/src/test/debuginfo/managed-pointer-within-unique.rs +++ b/src/test/debuginfo/managed-pointer-within-unique.rs @@ -37,9 +37,9 @@ struct ContainsManaged { } fn main() { - let ordinary_unique = box() (-1, -2); + let ordinary_unique = box() (-1i, -2i); - let managed_within_unique = box ContainsManaged { x: -3, y: box(GC) -4 }; + let managed_within_unique = box ContainsManaged { x: -3, y: box(GC) -4i }; zzz(); } diff --git a/src/test/debuginfo/method-on-generic-struct.rs b/src/test/debuginfo/method-on-generic-struct.rs index 2f7b0c845ea..0bac86b1e66 100644 --- a/src/test/debuginfo/method-on-generic-struct.rs +++ b/src/test/debuginfo/method-on-generic-struct.rs @@ -91,7 +91,7 @@ fn main() { let _ = stack.self_by_ref(-1, -2); let _ = stack.self_by_val(-3, -4); - let owned = box Struct { x: 1234.5 }; + let owned = box Struct { x: 1234.5f64 }; let _ = owned.self_by_ref(-5, -6); let _ = owned.self_by_val(-7, -8); let _ = owned.self_owned(-9, -10); diff --git a/src/test/debuginfo/multiple-functions-equal-var-names.rs b/src/test/debuginfo/multiple-functions-equal-var-names.rs index 510718254d9..9e40f03c201 100644 --- a/src/test/debuginfo/multiple-functions-equal-var-names.rs +++ b/src/test/debuginfo/multiple-functions-equal-var-names.rs @@ -31,18 +31,18 @@ #![allow(unused_variable)] fn function_one() { - let abc = 10101; + let abc = 10101i; zzz(); } fn function_two() { - let abc = 20202; + let abc = 20202i; zzz(); } fn function_three() { - let abc = 30303; + let abc = 30303i; zzz(); } diff --git a/src/test/debuginfo/multiple-functions.rs b/src/test/debuginfo/multiple-functions.rs index 362a8a93dd1..ef1c69f9eb8 100644 --- a/src/test/debuginfo/multiple-functions.rs +++ b/src/test/debuginfo/multiple-functions.rs @@ -31,18 +31,18 @@ #![allow(unused_variable)] fn function_one() { - let a = 10101; + let a = 10101i; zzz(); } fn function_two() { - let b = 20202; + let b = 20202i; zzz(); } fn function_three() { - let c = 30303; + let c = 30303i; zzz(); } diff --git a/src/test/debuginfo/name-shadowing-and-scope-nesting.rs b/src/test/debuginfo/name-shadowing-and-scope-nesting.rs index f967ced38ec..8ee6d434016 100644 --- a/src/test/debuginfo/name-shadowing-and-scope-nesting.rs +++ b/src/test/debuginfo/name-shadowing-and-scope-nesting.rs @@ -63,25 +63,25 @@ fn main() { zzz(); sentinel(); - let x = 10; + let x = 10i; zzz(); sentinel(); - let x = 10.5; - let y = 20; + let x = 10.5f64; + let y = 20i; zzz(); sentinel(); { let x = true; - let y = 2220; + let y = 2220i; zzz(); sentinel(); - let x = 203203.5; + let x = 203203.5f64; zzz(); sentinel(); diff --git a/src/test/debuginfo/option-like-enum.rs b/src/test/debuginfo/option-like-enum.rs index 04cd7e13863..de6d6814308 100644 --- a/src/test/debuginfo/option-like-enum.rs +++ b/src/test/debuginfo/option-like-enum.rs @@ -72,18 +72,18 @@ struct NamedFieldsRepr<'a> { fn main() { - let some: Option<&u32> = Some(unsafe { std::mem::transmute(0x12345678) }); + let some: Option<&u32> = Some(unsafe { std::mem::transmute(0x12345678u) }); let none: Option<&u32> = None; - let full = Full(454545, unsafe { std::mem::transmute(0x87654321) }, 9988); + let full = Full(454545, unsafe { std::mem::transmute(0x87654321u) }, 9988); - let int_val = 0; + let int_val = 0i; let empty: &MoreFieldsRepr = unsafe { std::mem::transmute(&Empty) }; let droid = Droid { id: 675675, range: 10000001, - internals: unsafe { std::mem::transmute(0x43218765) } + internals: unsafe { std::mem::transmute(0x43218765u) } }; let void_droid: &NamedFieldsRepr = unsafe { std::mem::transmute(&Void) }; diff --git a/src/test/debuginfo/shadowed-argument.rs b/src/test/debuginfo/shadowed-argument.rs index 129263c0f76..c180d6b5bcf 100644 --- a/src/test/debuginfo/shadowed-argument.rs +++ b/src/test/debuginfo/shadowed-argument.rs @@ -39,13 +39,13 @@ fn a_function(x: bool, y: bool) { zzz(); sentinel(); - let x = 10; + let x = 10i; zzz(); sentinel(); - let x = 10.5; - let y = 20; + let x = 10.5f64; + let y = 20i; zzz(); sentinel(); diff --git a/src/test/debuginfo/shadowed-variable.rs b/src/test/debuginfo/shadowed-variable.rs index 825ecb9c0ca..88ef3c4879e 100644 --- a/src/test/debuginfo/shadowed-variable.rs +++ b/src/test/debuginfo/shadowed-variable.rs @@ -42,13 +42,13 @@ fn main() { zzz(); sentinel(); - let x = 10; + let x = 10i; zzz(); sentinel(); - let x = 10.5; - let y = 20; + let x = 10.5f64; + let y = 20i; zzz(); sentinel(); diff --git a/src/test/debuginfo/simple-lexical-scope.rs b/src/test/debuginfo/simple-lexical-scope.rs index 171e3eae659..107b64131e0 100644 --- a/src/test/debuginfo/simple-lexical-scope.rs +++ b/src/test/debuginfo/simple-lexical-scope.rs @@ -60,7 +60,7 @@ fn main() { zzz(); sentinel(); - let x = 10; + let x = 10i; zzz(); sentinel(); @@ -69,7 +69,7 @@ fn main() { zzz(); sentinel(); - let x = 10.5; + let x = 10.5f64; zzz(); sentinel(); diff --git a/src/test/debuginfo/vec.rs b/src/test/debuginfo/vec.rs index 11f317469a2..155865f415b 100644 --- a/src/test/debuginfo/vec.rs +++ b/src/test/debuginfo/vec.rs @@ -26,7 +26,7 @@ static mut VECT: [i32, ..3] = [1, 2, 3]; fn main() { - let a = [1, 2, 3]; + let a = [1i, 2, 3]; unsafe { VECT[0] = 4; diff --git a/src/test/pretty/block-disambig.rs b/src/test/pretty/block-disambig.rs index 20d634d0475..9433ddf1a1f 100644 --- a/src/test/pretty/block-disambig.rs +++ b/src/test/pretty/block-disambig.rs @@ -17,9 +17,9 @@ use std::cell::Cell; use std::gc::GC; -fn test1() { let val = box(GC) 0; { } *val; } +fn test1() { let val = box(GC) 0i; { } *val; } -fn test2() -> int { let val = box(GC) 0; { } *val } +fn test2() -> int { let val = box(GC) 0i; { } *val } struct S { eax: int } @@ -36,13 +36,13 @@ fn test5() -> (int, int) { { } (0, 1) } fn test6() -> bool { { } (true || false) && true } fn test7() -> uint { - let regs = box(GC) 0; + let regs = box(GC) 0i; match true { true => { } _ => { } } (*regs < 2) as uint } fn test8() -> int { - let val = box(GC) 0; + let val = box(GC) 0i; match true { true => { } _ => { } @@ -55,12 +55,12 @@ fn test8() -> int { } fn test9() { - let regs = box(GC) Cell::new(0); + let regs = box(GC) Cell::new(0i); match true { true => { } _ => { } } regs.set(regs.get() + 1); } fn test10() -> int { - let regs = box(GC) vec!(0); + let regs = box(GC) vec!(0i); match true { true => { } _ => { } } *(*regs).get(0) } diff --git a/src/test/pretty/issue-929.rs b/src/test/pretty/issue-929.rs index 636fac82b6b..85b71e4e86c 100644 --- a/src/test/pretty/issue-929.rs +++ b/src/test/pretty/issue-929.rs @@ -8,6 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn f() { if (1 == fail!()) { } else { } } +fn f() { if (1i == fail!()) { } else { } } fn main() { } diff --git a/src/test/pretty/match-naked-expr-medium.rs b/src/test/pretty/match-naked-expr-medium.rs index 5cf6d838f25..c03ad499478 100644 --- a/src/test/pretty/match-naked-expr-medium.rs +++ b/src/test/pretty/match-naked-expr-medium.rs @@ -11,7 +11,7 @@ // pp-exact fn main() { - let x = Some(3); + let x = Some(3i); let _y = match x { Some(_) => diff --git a/src/test/pretty/match-naked-expr.rs b/src/test/pretty/match-naked-expr.rs index bb14a74fc18..67c389f7e1f 100644 --- a/src/test/pretty/match-naked-expr.rs +++ b/src/test/pretty/match-naked-expr.rs @@ -11,7 +11,7 @@ // pp-exact fn main() { - let x = Some(3); + let x = Some(3i); let _y = match x { Some(_) => "some(_)".to_string(), diff --git a/src/test/pretty/unary-op-disambig.rs b/src/test/pretty/unary-op-disambig.rs index 1592e010aaf..850904fe53e 100644 --- a/src/test/pretty/unary-op-disambig.rs +++ b/src/test/pretty/unary-op-disambig.rs @@ -18,10 +18,10 @@ fn block_nosemi() -> int { ({ 0 }) - 1 } fn if_semi() -> int { if true { f() } else { f() }; -1 } -fn if_nosemi() -> int { (if true { 0 } else { 0 }) - 1 } +fn if_nosemi() -> int { (if true { 0i } else { 0i }) - 1 } fn alt_semi() -> int { match true { true => { f() } _ => { } }; -1 } fn alt_no_semi() -> int { (match true { true => { 0 } _ => { 1 } }) - 1 } -fn stmt() { { f() }; -1; } +fn stmt() { { f() }; -1i; } diff --git a/src/test/pretty/vec-comments.pp b/src/test/pretty/vec-comments.pp index dc2dae1044d..401c63efbc4 100644 --- a/src/test/pretty/vec-comments.pp +++ b/src/test/pretty/vec-comments.pp @@ -15,25 +15,25 @@ fn main() { let _v1 = [ // Comment - 0, + 0i, // Comment - 1, + 1i, // Comment - 2]; + 2i]; let _v2 = - [0, // Comment - 1, // Comment - 2]; // Comment + [0i, // Comment + 1i, // Comment + 2i]; // Comment let _v3 = [ /* Comment */ - 0, + 0i, /* Comment */ - 1, + 1i, /* Comment */ - 2]; + 2i]; let _v4 = - [0, /* Comment */ - 1, /* Comment */ - 2]; /* Comment */ + [0i, /* Comment */ + 1i, /* Comment */ + 2i]; /* Comment */ } diff --git a/src/test/pretty/vec-comments.rs b/src/test/pretty/vec-comments.rs index dc2dae1044d..401c63efbc4 100644 --- a/src/test/pretty/vec-comments.rs +++ b/src/test/pretty/vec-comments.rs @@ -15,25 +15,25 @@ fn main() { let _v1 = [ // Comment - 0, + 0i, // Comment - 1, + 1i, // Comment - 2]; + 2i]; let _v2 = - [0, // Comment - 1, // Comment - 2]; // Comment + [0i, // Comment + 1i, // Comment + 2i]; // Comment let _v3 = [ /* Comment */ - 0, + 0i, /* Comment */ - 1, + 1i, /* Comment */ - 2]; + 2i]; let _v4 = - [0, /* Comment */ - 1, /* Comment */ - 2]; /* Comment */ + [0i, /* Comment */ + 1i, /* Comment */ + 2i]; /* Comment */ } diff --git a/src/test/run-fail/assert-as-macro.rs b/src/test/run-fail/assert-as-macro.rs index c52c11b1b91..fb069e61bd2 100644 --- a/src/test/run-fail/assert-as-macro.rs +++ b/src/test/run-fail/assert-as-macro.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:assertion failed: 1 == 2 +// error-pattern:assertion failed: 1i == 2 fn main() { - assert!(1 == 2); + assert!(1i == 2); } diff --git a/src/test/run-fail/bounds-check-no-overflow.rs b/src/test/run-fail/bounds-check-no-overflow.rs index be4ad0781f2..df9050e2186 100644 --- a/src/test/run-fail/bounds-check-no-overflow.rs +++ b/src/test/run-fail/bounds-check-no-overflow.rs @@ -14,6 +14,6 @@ use std::uint; use std::mem::size_of; fn main() { - let xs = [1, 2, 3]; + let xs = [1i, 2, 3]; xs[uint::MAX / size_of::<int>() + 1]; } diff --git a/src/test/run-fail/divide-by-zero.rs b/src/test/run-fail/divide-by-zero.rs index de69b7b9fa6..c58d30f2729 100644 --- a/src/test/run-fail/divide-by-zero.rs +++ b/src/test/run-fail/divide-by-zero.rs @@ -10,6 +10,6 @@ // error-pattern:attempted to divide by zero fn main() { - let y = 0; - let _z = 1 / y; + let y = 0i; + let _z = 1i / y; } diff --git a/src/test/run-fail/explicit-fail-msg.rs b/src/test/run-fail/explicit-fail-msg.rs index f860fdffba1..4af9b82ec7e 100644 --- a/src/test/run-fail/explicit-fail-msg.rs +++ b/src/test/run-fail/explicit-fail-msg.rs @@ -13,7 +13,7 @@ // error-pattern:wooooo fn main() { - let mut a = 1; - if 1 == 1 { a = 2; } + let mut a = 1i; + if 1i == 1 { a = 2; } fail!(format!("woooo{}", "o")); } diff --git a/src/test/run-fail/expr-if-fail.rs b/src/test/run-fail/expr-if-fail.rs index 73259e6e140..55d86bc6493 100644 --- a/src/test/run-fail/expr-if-fail.rs +++ b/src/test/run-fail/expr-if-fail.rs @@ -12,4 +12,4 @@ // error-pattern:explicit failure -fn main() { let _x = if false { 0 } else if true { fail!() } else { 10 }; } +fn main() { let _x = if false { 0i } else if true { fail!() } else { 10i }; } diff --git a/src/test/run-fail/expr-match-fail.rs b/src/test/run-fail/expr-match-fail.rs index 075f6f5b4b1..d15ec3f7b48 100644 --- a/src/test/run-fail/expr-match-fail.rs +++ b/src/test/run-fail/expr-match-fail.rs @@ -12,4 +12,4 @@ // error-pattern:explicit failure -fn main() { let _x = match true { false => { 0 } true => { fail!() } }; } +fn main() { let _x = match true { false => { 0i } true => { fail!() } }; } diff --git a/src/test/run-fail/fail-task-name-owned.rs b/src/test/run-fail/fail-task-name-owned.rs index b1c8963e684..edb03b2d6b4 100644 --- a/src/test/run-fail/fail-task-name-owned.rs +++ b/src/test/run-fail/fail-task-name-owned.rs @@ -16,7 +16,7 @@ fn main() { let r: Result<int,_> = TaskBuilder::new().named("owned name".to_string()) .try(proc() { fail!("test"); - 1 + 1i }); assert!(r.is_ok()); } diff --git a/src/test/run-fail/fail-task-name-send-str.rs b/src/test/run-fail/fail-task-name-send-str.rs index 5153c5f2807..0a740099778 100644 --- a/src/test/run-fail/fail-task-name-send-str.rs +++ b/src/test/run-fail/fail-task-name-send-str.rs @@ -15,7 +15,7 @@ fn main() { ::std::task::TaskBuilder::new().named("send name".into_maybe_owned()) .try(proc() { fail!("test"); - 3 + 3i }); assert!(r.is_ok()); } diff --git a/src/test/run-fail/fail.rs b/src/test/run-fail/fail.rs index 42cf79af66e..54ccc98bcd9 100644 --- a/src/test/run-fail/fail.rs +++ b/src/test/run-fail/fail.rs @@ -11,5 +11,5 @@ -// error-pattern:1 == 2 -fn main() { assert!((1 == 2)); } +// error-pattern:1i == 2 +fn main() { assert!((1i == 2)); } diff --git a/src/test/run-fail/issue-3029.rs b/src/test/run-fail/issue-3029.rs index a57f4683df3..80e275019ce 100644 --- a/src/test/run-fail/issue-3029.rs +++ b/src/test/run-fail/issue-3029.rs @@ -16,7 +16,7 @@ // error-pattern:so long fn main() { let mut x = Vec::new(); - let y = vec!(3); + let y = vec!(3i); fail!("so long"); x.push_all_move(y); } diff --git a/src/test/run-fail/mod-zero.rs b/src/test/run-fail/mod-zero.rs index 76d4de7ecb0..54415051708 100644 --- a/src/test/run-fail/mod-zero.rs +++ b/src/test/run-fail/mod-zero.rs @@ -10,6 +10,6 @@ // error-pattern:attempted remainder with a divisor of zero fn main() { - let y = 0; - let _z = 1 % y; + let y = 0i; + let _z = 1i % y; } diff --git a/src/test/run-fail/unwind-assert.rs b/src/test/run-fail/unwind-assert.rs index 2f6bd9ad255..c4dd8802d8a 100644 --- a/src/test/run-fail/unwind-assert.rs +++ b/src/test/run-fail/unwind-assert.rs @@ -15,6 +15,6 @@ use std::gc::GC; fn main() { - let _a = box(GC) 0; + let _a = box(GC) 0i; assert!(false); } diff --git a/src/test/run-fail/unwind-box-res.rs b/src/test/run-fail/unwind-box-res.rs index c370846c673..f80f25ec6eb 100644 --- a/src/test/run-fail/unwind-box-res.rs +++ b/src/test/run-fail/unwind-box-res.rs @@ -41,7 +41,7 @@ fn r(v: *const int) -> r { fn main() { unsafe { - let i1 = box 0; + let i1 = box 0i; let i1p = mem::transmute_copy(&i1); mem::forget(i1); let x = box(GC) r(i1p); diff --git a/src/test/run-fail/unwind-box.rs b/src/test/run-fail/unwind-box.rs index e31f66ed9fb..3647c553bf2 100644 --- a/src/test/run-fail/unwind-box.rs +++ b/src/test/run-fail/unwind-box.rs @@ -19,6 +19,6 @@ fn failfn() { } fn main() { - box(GC) 0; + box(GC) 0i; failfn(); } diff --git a/src/test/run-fail/unwind-fail.rs b/src/test/run-fail/unwind-fail.rs index 5dbfd73c1d7..e25fe1908ba 100644 --- a/src/test/run-fail/unwind-fail.rs +++ b/src/test/run-fail/unwind-fail.rs @@ -15,6 +15,6 @@ use std::gc::GC; fn main() { - box(GC) 0; + box(GC) 0i; fail!(); } diff --git a/src/test/run-fail/unwind-interleaved.rs b/src/test/run-fail/unwind-interleaved.rs index 6f2400ec4f0..f6a3aa48def 100644 --- a/src/test/run-fail/unwind-interleaved.rs +++ b/src/test/run-fail/unwind-interleaved.rs @@ -15,8 +15,8 @@ fn a() { } fn b() { fail!(); } fn main() { - let _x = vec!(0); + let _x = vec!(0i); a(); - let _y = vec!(0); + let _y = vec!(0i); b(); } diff --git a/src/test/run-fail/unwind-iter.rs b/src/test/run-fail/unwind-iter.rs index 8671758c423..d77a9f911b5 100644 --- a/src/test/run-fail/unwind-iter.rs +++ b/src/test/run-fail/unwind-iter.rs @@ -22,6 +22,6 @@ fn x(it: |int|) { } fn main() { - let a = box(GC) 0; + let a = box(GC) 0i; x(|_i| { } ); } diff --git a/src/test/run-fail/unwind-iter2.rs b/src/test/run-fail/unwind-iter2.rs index d7b950ad5c1..9f00c0bc8ba 100644 --- a/src/test/run-fail/unwind-iter2.rs +++ b/src/test/run-fail/unwind-iter2.rs @@ -15,7 +15,7 @@ use std::gc::{GC}; fn x(it: |int|) { - let _a = box(GC) 0; + let _a = box(GC) 0i; it(1); } diff --git a/src/test/run-fail/unwind-match.rs b/src/test/run-fail/unwind-match.rs index 4f1e454c39e..f256884b312 100644 --- a/src/test/run-fail/unwind-match.rs +++ b/src/test/run-fail/unwind-match.rs @@ -16,7 +16,7 @@ use std::gc::GC; fn test_box() { - box(GC) 0; + box(GC) 0i; } fn test_str() { let res = match false { true => { "happy".to_string() }, diff --git a/src/test/run-fail/unwind-nested.rs b/src/test/run-fail/unwind-nested.rs index b7a12f08c41..bebf06cf45a 100644 --- a/src/test/run-fail/unwind-nested.rs +++ b/src/test/run-fail/unwind-nested.rs @@ -15,9 +15,9 @@ use std::gc::GC; fn main() { - let _a = box(GC) 0; + let _a = box(GC) 0i; { - let _b = box(GC) 0; + let _b = box(GC) 0i; { fail!(); } diff --git a/src/test/run-fail/unwind-partial-box.rs b/src/test/run-fail/unwind-partial-box.rs index 2bd264d0e33..5912f8167bc 100644 --- a/src/test/run-fail/unwind-partial-box.rs +++ b/src/test/run-fail/unwind-partial-box.rs @@ -19,7 +19,7 @@ fn f() -> Vec<int> { fail!(); } // Voodoo. In unwind-alt we had to do this to trigger the bug. Might // have been to do with memory allocation patterns. fn prime() { - box(GC) 0; + box(GC) 0i; } fn partial() { diff --git a/src/test/run-fail/unwind-partial-unique.rs b/src/test/run-fail/unwind-partial-unique.rs index 4ea099e9c0f..2e6eee65738 100644 --- a/src/test/run-fail/unwind-partial-unique.rs +++ b/src/test/run-fail/unwind-partial-unique.rs @@ -19,7 +19,7 @@ fn f() -> Vec<int> { fail!(); } // Voodoo. In unwind-alt we had to do this to trigger the bug. Might // have been to do with memory allocation patterns. fn prime() { - box(GC) 0; + box(GC) 0i; } fn partial() { diff --git a/src/test/run-fail/unwind-partial-vec.rs b/src/test/run-fail/unwind-partial-vec.rs index e0e043f623b..7ad02fcd3d7 100644 --- a/src/test/run-fail/unwind-partial-vec.rs +++ b/src/test/run-fail/unwind-partial-vec.rs @@ -19,11 +19,11 @@ fn f() -> Vec<int> { fail!(); } // Voodoo. In unwind-alt we had to do this to trigger the bug. Might // have been to do with memory allocation patterns. fn prime() { - box(GC) 0; + box(GC) 0i; } fn partial() { - let _x = vec!(vec!(0), f(), vec!(0)); + let _x = vec!(vec!(0i), f(), vec!(0i)); } fn main() { diff --git a/src/test/run-fail/unwind-resource-fail.rs b/src/test/run-fail/unwind-resource-fail.rs index 498d3ee6b0b..8d0a14306d9 100644 --- a/src/test/run-fail/unwind-resource-fail.rs +++ b/src/test/run-fail/unwind-resource-fail.rs @@ -25,6 +25,6 @@ impl Drop for r { fn r(i: int) -> r { r { i: i } } fn main() { - box(GC) 0; + box(GC) 0i; let _r = r(0); } diff --git a/src/test/run-fail/unwind-stacked.rs b/src/test/run-fail/unwind-stacked.rs index da6205e9e37..97f4d974d8d 100644 --- a/src/test/run-fail/unwind-stacked.rs +++ b/src/test/run-fail/unwind-stacked.rs @@ -15,16 +15,16 @@ use std::gc::GC; fn f() { - let _a = box(GC) 0; + let _a = box(GC) 0i; fail!(); } fn g() { - let _b = box(GC) 0; + let _b = box(GC) 0i; f(); } fn main() { - let _a = box(GC) 0; + let _a = box(GC) 0i; g(); } diff --git a/src/test/run-fail/unwind-tup.rs b/src/test/run-fail/unwind-tup.rs index 08a22a7c355..4a7914c568a 100644 --- a/src/test/run-fail/unwind-tup.rs +++ b/src/test/run-fail/unwind-tup.rs @@ -19,5 +19,5 @@ fn fold_local() -> Gc<Vec<int>> { } fn main() { - let _lss = (fold_local(), 0); + let _lss = (fold_local(), 0i); } diff --git a/src/test/run-fail/unwind-uninitialized.rs b/src/test/run-fail/unwind-uninitialized.rs index acba93f7be3..29723b12729 100644 --- a/src/test/run-fail/unwind-uninitialized.rs +++ b/src/test/run-fail/unwind-uninitialized.rs @@ -20,5 +20,5 @@ fn f() { fn main() { f(); - let _a = box(GC) 0; + let _a = box(GC) 0i; } diff --git a/src/test/run-fail/unwind-unique.rs b/src/test/run-fail/unwind-unique.rs index af1e499d1f2..233d367c4b1 100644 --- a/src/test/run-fail/unwind-unique.rs +++ b/src/test/run-fail/unwind-unique.rs @@ -16,6 +16,6 @@ fn failfn() { } fn main() { - box 0; + box 0i; failfn(); } diff --git a/src/test/run-make/graphviz-flowgraph/f01.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f01.dot-expected.dot index 9d8411cfc58..a5239a6cc66 100644 --- a/src/test/run-make/graphviz-flowgraph/f01.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f01.dot-expected.dot @@ -1,8 +1,8 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 1"]; - N3[label="block { 1; }"]; + N2[label="expr 1i"]; + N3[label="block { 1i; }"]; N0 -> N2; N2 -> N3; N3 -> N1; diff --git a/src/test/run-make/graphviz-flowgraph/f01.rs b/src/test/run-make/graphviz-flowgraph/f01.rs index 231aab69e50..f1f1a1d5472 100644 --- a/src/test/run-make/graphviz-flowgraph/f01.rs +++ b/src/test/run-make/graphviz-flowgraph/f01.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn lit_1() { - 1; + 1i; } diff --git a/src/test/run-make/graphviz-flowgraph/f03.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f03.dot-expected.dot index aff430459e8..43462862f6e 100644 --- a/src/test/run-make/graphviz-flowgraph/f03.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f03.dot-expected.dot @@ -1,10 +1,10 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 3"]; - N3[label="expr 33"]; - N4[label="expr 3 + 33"]; - N5[label="block { 3 + 33; }"]; + N2[label="expr 3i"]; + N3[label="expr 33i"]; + N4[label="expr 3i + 33i"]; + N5[label="block { 3i + 33i; }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f03.rs b/src/test/run-make/graphviz-flowgraph/f03.rs index 8b172c0a105..1007225f2f2 100644 --- a/src/test/run-make/graphviz-flowgraph/f03.rs +++ b/src/test/run-make/graphviz-flowgraph/f03.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn expr_add_3() { - 3 + 33; + 3i + 33i; } diff --git a/src/test/run-make/graphviz-flowgraph/f04.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f04.dot-expected.dot index adcc582c733..26c858a0828 100644 --- a/src/test/run-make/graphviz-flowgraph/f04.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f04.dot-expected.dot @@ -1,9 +1,9 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 4"]; + N2[label="expr 4i"]; N3[label="local _x"]; - N4[label="block { let _x = 4; }"]; + N4[label="block { let _x = 4i; }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f04.rs b/src/test/run-make/graphviz-flowgraph/f04.rs index 2a0ac8ac9e5..ed2f7e25dae 100644 --- a/src/test/run-make/graphviz-flowgraph/f04.rs +++ b/src/test/run-make/graphviz-flowgraph/f04.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn pat_id_4() { - let _x = 4; + let _x = 4i; } diff --git a/src/test/run-make/graphviz-flowgraph/f05.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f05.dot-expected.dot index 2d52c14da62..850d04f430f 100644 --- a/src/test/run-make/graphviz-flowgraph/f05.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f05.dot-expected.dot @@ -1,13 +1,13 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 5"]; - N3[label="expr 55"]; - N4[label="expr (5, 55)"]; + N2[label="expr 5i"]; + N3[label="expr 55i"]; + N4[label="expr (5i, 55i)"]; N5[label="local _x"]; N6[label="local _y"]; N7[label="pat (_x, _y)"]; - N8[label="block { let (_x, _y) = (5, 55); }"]; + N8[label="block { let (_x, _y) = (5i, 55i); }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f05.rs b/src/test/run-make/graphviz-flowgraph/f05.rs index 616d822bed0..b2591bdd08a 100644 --- a/src/test/run-make/graphviz-flowgraph/f05.rs +++ b/src/test/run-make/graphviz-flowgraph/f05.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn pat_tup_5() { - let (_x, _y) = (5, 55); + let (_x, _y) = (5i, 55i); } diff --git a/src/test/run-make/graphviz-flowgraph/f07.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f07.dot-expected.dot index c99af179149..251798fc7ed 100644 --- a/src/test/run-make/graphviz-flowgraph/f07.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f07.dot-expected.dot @@ -1,12 +1,12 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 7"]; - N3[label="expr 77"]; - N4[label="expr 777"]; - N5[label="expr 7777"]; - N6[label="expr [7, 77, 777, 7777]"]; - N7[label="expr match [7, 77, 777, 7777] { [x, y, ..] => x + y }"]; + N2[label="expr 7i"]; + N3[label="expr 77i"]; + N4[label="expr 777i"]; + N5[label="expr 7777i"]; + N6[label="expr [7i, 77i, 777i, 7777i]"]; + N7[label="expr match [7i, 77i, 777i, 7777i] { [x, y, ..] => x + y }"]; N8[label="local x"]; N9[label="local y"]; N10[label="pat .."]; @@ -14,7 +14,7 @@ digraph block { N12[label="expr x"]; N13[label="expr y"]; N14[label="expr x + y"]; - N15[label="block { match [7, 77, 777, 7777] { [x, y, ..] => x + y }; }"]; + N15[label="block { match [7i, 77i, 777i, 7777i] { [x, y, ..] => x + y }; }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f07.rs b/src/test/run-make/graphviz-flowgraph/f07.rs index 39f71d309fd..fb3f2d24cdd 100644 --- a/src/test/run-make/graphviz-flowgraph/f07.rs +++ b/src/test/run-make/graphviz-flowgraph/f07.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn pat_vec_7() { - match [7, 77, 777, 7777] { + match [7i, 77i, 777i, 7777i] { [x, y, ..] => x + y }; } diff --git a/src/test/run-make/graphviz-flowgraph/f08.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f08.dot-expected.dot index 61a708cd9cc..f43beb025e3 100644 --- a/src/test/run-make/graphviz-flowgraph/f08.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f08.dot-expected.dot @@ -1,18 +1,18 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 8"]; + N2[label="expr 8i"]; N3[label="local x"]; N4[label="local _y"]; N5[label="expr x"]; - N6[label="expr 88"]; - N7[label="expr x > 88"]; - N8[label="expr 888"]; + N6[label="expr 88i"]; + N7[label="expr x > 88i"]; + N8[label="expr 888i"]; N9[label="expr _y"]; - N10[label="expr _y = 888"]; - N11[label="block { _y = 888; }"]; - N12[label="expr if x > 88 { _y = 888; }"]; - N13[label="block { let x = 8; let _y; if x > 88 { _y = 888; } }"]; + N10[label="expr _y = 888i"]; + N11[label="block { _y = 888i; }"]; + N12[label="expr if x > 88i { _y = 888i; }"]; + N13[label="block { let x = 8i; let _y; if x > 88i { _y = 888i; } }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f08.rs b/src/test/run-make/graphviz-flowgraph/f08.rs index 6ba7b03d54d..5d166e5ffcd 100644 --- a/src/test/run-make/graphviz-flowgraph/f08.rs +++ b/src/test/run-make/graphviz-flowgraph/f08.rs @@ -9,8 +9,8 @@ // except according to those terms. pub fn expr_if_onearm_8() { - let x = 8; let _y; - if x > 88 { - _y = 888; + let x = 8i; let _y; + if x > 88i { + _y = 888i; } } diff --git a/src/test/run-make/graphviz-flowgraph/f09.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f09.dot-expected.dot index 892b9fcd841..a3576b9c36b 100644 --- a/src/test/run-make/graphviz-flowgraph/f09.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f09.dot-expected.dot @@ -1,25 +1,25 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 91"]; + N2[label="expr 91i"]; N3[label="local x"]; N4[label="local _y"]; N5[label="expr x"]; - N6[label="expr 92"]; - N7[label="expr x > 92"]; - N8[label="expr 93"]; + N6[label="expr 92i"]; + N7[label="expr x > 92i"]; + N8[label="expr 93i"]; N9[label="expr _y"]; - N10[label="expr _y = 93"]; - N11[label="block { _y = 93; }"]; - N12[label="expr 94"]; - N13[label="expr 95"]; - N14[label="expr 94 + 95"]; + N10[label="expr _y = 93i"]; + N11[label="block { _y = 93i; }"]; + N12[label="expr 94i"]; + N13[label="expr 95i"]; + N14[label="expr 94i + 95i"]; N15[label="expr _y"]; - N16[label="expr _y = 94 + 95"]; - N17[label="block { _y = 94 + 95; }"]; - N18[label="expr { _y = 94 + 95; }"]; - N19[label="expr if x > 92 { _y = 93; } else { _y = 94 + 95; }"]; - N20[label="block { let x = 91; let _y; if x > 92 { _y = 93; } else { _y = 94 + 95; } }"]; + N16[label="expr _y = 94i + 95i"]; + N17[label="block { _y = 94i + 95i; }"]; + N18[label="expr { _y = 94i + 95i; }"]; + N19[label="expr if x > 92i { _y = 93i; } else { _y = 94i + 95i; }"]; + N20[label="block { let x = 91i; let _y; if x > 92i { _y = 93i; } else { _y = 94i + 95i; } }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f09.rs b/src/test/run-make/graphviz-flowgraph/f09.rs index a78ccb8a937..cfe5f4f37d6 100644 --- a/src/test/run-make/graphviz-flowgraph/f09.rs +++ b/src/test/run-make/graphviz-flowgraph/f09.rs @@ -9,10 +9,10 @@ // except according to those terms. pub fn expr_if_twoarm_9() { - let x = 91; let _y; - if x > 92 { - _y = 93; + let x = 91i; let _y; + if x > 92i { + _y = 93i; } else { - _y = 94+95; + _y = 94i+95i; } } diff --git a/src/test/run-make/graphviz-flowgraph/f10.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f10.dot-expected.dot index 2cef122104e..69b5bd6f58c 100644 --- a/src/test/run-make/graphviz-flowgraph/f10.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f10.dot-expected.dot @@ -1,18 +1,18 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 10"]; + N2[label="expr 10i"]; N3[label="local mut x"]; N4[label="(dummy_node)"]; N5[label="expr x"]; - N6[label="expr 0"]; - N7[label="expr x > 0"]; - N8[label="expr while x > 0 { x -= 1; }"]; - N9[label="expr 1"]; + N6[label="expr 0i"]; + N7[label="expr x > 0i"]; + N8[label="expr while x > 0i { x -= 1i; }"]; + N9[label="expr 1i"]; N10[label="expr x"]; - N11[label="expr x -= 1"]; - N12[label="block { x -= 1; }"]; - N13[label="block { let mut x = 10; while x > 0 { x -= 1; } }"]; + N11[label="expr x -= 1i"]; + N12[label="block { x -= 1i; }"]; + N13[label="block { let mut x = 10i; while x > 0i { x -= 1i; } }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f10.rs b/src/test/run-make/graphviz-flowgraph/f10.rs index 0ca7cc5ee86..af263f0cf10 100644 --- a/src/test/run-make/graphviz-flowgraph/f10.rs +++ b/src/test/run-make/graphviz-flowgraph/f10.rs @@ -9,8 +9,8 @@ // except according to those terms. pub fn expr_while_10() { - let mut x = 10; - while x > 0 { - x -= 1; + let mut x = 10i; + while x > 0i { + x -= 1i; } } diff --git a/src/test/run-make/graphviz-flowgraph/f11.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f11.dot-expected.dot index 59d65e5b8b7..44024cf76f3 100644 --- a/src/test/run-make/graphviz-flowgraph/f11.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f11.dot-expected.dot @@ -1,16 +1,16 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 11"]; + N2[label="expr 11i"]; N3[label="local mut _x"]; N4[label="(dummy_node)"]; - N5[label="expr loop { _x -= 1; }"]; - N6[label="expr 1"]; + N5[label="expr loop { _x -= 1i; }"]; + N6[label="expr 1i"]; N7[label="expr _x"]; - N8[label="expr _x -= 1"]; - N9[label="block { _x -= 1; }"]; + N8[label="expr _x -= 1i"]; + N9[label="block { _x -= 1i; }"]; N10[label="expr \"unreachable\""]; - N11[label="block { let mut _x = 11; loop { _x -= 1; } \"unreachable\"; }"]; + N11[label="block { let mut _x = 11i; loop { _x -= 1i; } \"unreachable\"; }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f11.rs b/src/test/run-make/graphviz-flowgraph/f11.rs index d0f3452119e..95260c608ec 100644 --- a/src/test/run-make/graphviz-flowgraph/f11.rs +++ b/src/test/run-make/graphviz-flowgraph/f11.rs @@ -10,9 +10,9 @@ #[allow(unreachable_code)] pub fn expr_loop_11() { - let mut _x = 11; + let mut _x = 11i; loop { - _x -= 1; + _x -= 1i; } "unreachable"; } diff --git a/src/test/run-make/graphviz-flowgraph/f12.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f12.dot-expected.dot index 9c0f25d5bec..ad257c19741 100644 --- a/src/test/run-make/graphviz-flowgraph/f12.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f12.dot-expected.dot @@ -1,23 +1,23 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 12"]; + N2[label="expr 12i"]; N3[label="local mut x"]; N4[label="(dummy_node)"]; - N5[label="expr loop { x -= 1; if x == 2 { break ; \"unreachable\"; } }"]; - N6[label="expr 1"]; + N5[label="expr loop { x -= 1i; if x == 2i { break ; \"unreachable\"; } }"]; + N6[label="expr 1i"]; N7[label="expr x"]; - N8[label="expr x -= 1"]; + N8[label="expr x -= 1i"]; N9[label="expr x"]; - N10[label="expr 2"]; - N11[label="expr x == 2"]; + N10[label="expr 2i"]; + N11[label="expr x == 2i"]; N12[label="expr break"]; N13[label="(dummy_node)"]; N14[label="expr \"unreachable\""]; N15[label="block { break ; \"unreachable\"; }"]; - N16[label="expr if x == 2 { break ; \"unreachable\"; }"]; - N17[label="block { x -= 1; if x == 2 { break ; \"unreachable\"; } }"]; - N18[label="block { let mut x = 12; loop { x -= 1; if x == 2 { break ; \"unreachable\"; } } }"]; + N16[label="expr if x == 2i { break ; \"unreachable\"; }"]; + N17[label="block { x -= 1i; if x == 2i { break ; \"unreachable\"; } }"]; + N18[label="block { let mut x = 12i; loop { x -= 1i; if x == 2i { break ; \"unreachable\"; } } }"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -28,7 +28,7 @@ digraph block { N9 -> N10; N10 -> N11; N11 -> N12; - N12 -> N5[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 2 { break ; \"unreachable\"; },\lexiting scope_4 block { x -= 1; if x == 2 { break ; \"unreachable\"; } }"]; + N12 -> N5[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 2i { break ; \"unreachable\"; },\lexiting scope_4 block { x -= 1i; if x == 2i { break ; \"unreachable\"; } }"]; N13 -> N14; N14 -> N15; N11 -> N16; diff --git a/src/test/run-make/graphviz-flowgraph/f12.rs b/src/test/run-make/graphviz-flowgraph/f12.rs index 90b146340b6..625dd8cb03e 100644 --- a/src/test/run-make/graphviz-flowgraph/f12.rs +++ b/src/test/run-make/graphviz-flowgraph/f12.rs @@ -10,9 +10,9 @@ #[allow(unreachable_code)] pub fn expr_loop_12() { - let mut x = 12; + let mut x = 12i; loop { - x -= 1; - if x == 2 { break; "unreachable"; } + x -= 1i; + if x == 2i { break; "unreachable"; } } } diff --git a/src/test/run-make/graphviz-flowgraph/f14.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f14.dot-expected.dot index 0fa4e9b44de..f8e4bd12bb0 100644 --- a/src/test/run-make/graphviz-flowgraph/f14.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f14.dot-expected.dot @@ -1,17 +1,17 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 14"]; + N2[label="expr 14i"]; N3[label="local x"]; N4[label="expr x"]; - N5[label="expr 1"]; - N6[label="expr x > 1"]; + N5[label="expr 1i"]; + N6[label="expr x > 1i"]; N7[label="expr return"]; N8[label="(dummy_node)"]; N9[label="expr \"unreachable\""]; N10[label="block { return; \"unreachable\"; }"]; - N11[label="expr if x > 1 { return; \"unreachable\"; }"]; - N12[label="block { let x = 14; if x > 1 { return; \"unreachable\"; } }"]; + N11[label="expr if x > 1i { return; \"unreachable\"; }"]; + N12[label="block { let x = 14i; if x > 1i { return; \"unreachable\"; } }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f14.rs b/src/test/run-make/graphviz-flowgraph/f14.rs index 98ff095c831..72616f31594 100644 --- a/src/test/run-make/graphviz-flowgraph/f14.rs +++ b/src/test/run-make/graphviz-flowgraph/f14.rs @@ -10,8 +10,8 @@ #[allow(unreachable_code)] pub fn expr_ret_14() { - let x = 14; - if x > 1 { + let x = 14i; + if x > 1i { return; "unreachable"; } diff --git a/src/test/run-make/graphviz-flowgraph/f15.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f15.dot-expected.dot index f0278fba311..bc47d9aff81 100644 --- a/src/test/run-make/graphviz-flowgraph/f15.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f15.dot-expected.dot @@ -1,42 +1,42 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 15"]; + N2[label="expr 15i"]; N3[label="local mut x"]; - N4[label="expr 151"]; + N4[label="expr 151i"]; N5[label="local mut y"]; N6[label="(dummy_node)"]; - N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l }\l y -= 4;\l x -= 5;\l }\l"]; + N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l }\l y -= 4i;\l x -= 5i;\l }\l"]; N8[label="(dummy_node)"]; - N9[label="expr \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l }\l"]; + N9[label="expr \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l }\l"]; N10[label="expr x"]; - N11[label="expr 1"]; - N12[label="expr x == 1"]; + N11[label="expr 1i"]; + N12[label="expr x == 1i"]; N13[label="expr break \'outer"]; N14[label="(dummy_node)"]; N15[label="expr \"unreachable\""]; N16[label="block { break \'outer ; \"unreachable\" }"]; - N17[label="expr if x == 1 { break \'outer ; \"unreachable\" }"]; + N17[label="expr if x == 1i { break \'outer ; \"unreachable\" }"]; N18[label="expr y"]; - N19[label="expr 2"]; - N20[label="expr y >= 2"]; + N19[label="expr 2i"]; + N20[label="expr y >= 2i"]; N21[label="expr break"]; N22[label="(dummy_node)"]; N23[label="expr \"unreachable\""]; N24[label="block { break ; \"unreachable\" }"]; - N25[label="expr if y >= 2 { break ; \"unreachable\" }"]; - N26[label="expr 3"]; + N25[label="expr if y >= 2i { break ; \"unreachable\" }"]; + N26[label="expr 3i"]; N27[label="expr y"]; - N28[label="expr y -= 3"]; - N29[label="block {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l}\l"]; - N30[label="expr 4"]; + N28[label="expr y -= 3i"]; + N29[label="block {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l}\l"]; + N30[label="expr 4i"]; N31[label="expr y"]; - N32[label="expr y -= 4"]; - N33[label="expr 5"]; + N32[label="expr y -= 4i"]; + N33[label="expr 5i"]; N34[label="expr x"]; - N35[label="expr x -= 5"]; - N36[label="block {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l }\l y -= 4;\l x -= 5;\l}\l"]; - N37[label="block {\l let mut x = 15;\l let mut y = 151;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l }\l y -= 4;\l x -= 5;\l }\l}\l"]; + N35[label="expr x -= 5i"]; + N36[label="block {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l }\l y -= 4i;\l x -= 5i;\l}\l"]; + N37[label="block {\l let mut x = 15i;\l let mut y = 151i;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l }\l y -= 4i;\l x -= 5i;\l }\l}\l"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -47,7 +47,7 @@ digraph block { N10 -> N11; N11 -> N12; N12 -> N13; - N13 -> N7[label="exiting scope_0 expr break \'outer,\lexiting scope_1 stmt break \'outer ;,\lexiting scope_2 block { break \'outer ; \"unreachable\" },\lexiting scope_3 expr if x == 1 { break \'outer ; \"unreachable\" },\lexiting scope_4 stmt if x == 1 { break \'outer ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l }\l y -= 4;\l x -= 5;\l}\l"]; + N13 -> N7[label="exiting scope_0 expr break \'outer,\lexiting scope_1 stmt break \'outer ;,\lexiting scope_2 block { break \'outer ; \"unreachable\" },\lexiting scope_3 expr if x == 1i { break \'outer ; \"unreachable\" },\lexiting scope_4 stmt if x == 1i { break \'outer ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l }\l y -= 4i;\l x -= 5i;\l}\l"]; N14 -> N15; N15 -> N16; N12 -> N17; @@ -56,7 +56,7 @@ digraph block { N18 -> N19; N19 -> N20; N20 -> N21; - N21 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\" },\lexiting scope_3 expr if y >= 2 { break ; \"unreachable\" },\lexiting scope_4 stmt if y >= 2 { break ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1 { break \'outer ; \"unreachable\" }\l if y >= 2 { break ; \"unreachable\" }\l y -= 3;\l}\l"]; + N21 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\" },\lexiting scope_3 expr if y >= 2i { break ; \"unreachable\" },\lexiting scope_4 stmt if y >= 2i { break ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1i { break \'outer ; \"unreachable\" }\l if y >= 2i { break ; \"unreachable\" }\l y -= 3i;\l}\l"]; N22 -> N23; N23 -> N24; N20 -> N25; diff --git a/src/test/run-make/graphviz-flowgraph/f15.rs b/src/test/run-make/graphviz-flowgraph/f15.rs index 44c038d643b..e5ca1de3f2d 100644 --- a/src/test/run-make/graphviz-flowgraph/f15.rs +++ b/src/test/run-make/graphviz-flowgraph/f15.rs @@ -10,21 +10,21 @@ #[allow(unreachable_code)] pub fn expr_break_label_15() { - let mut x = 15; - let mut y = 151; + let mut x = 15i; + let mut y = 151i; 'outer: loop { 'inner: loop { - if x == 1 { + if x == 1i { break 'outer; "unreachable" } - if y >= 2 { + if y >= 2i { break; "unreachable" } - y -= 3; + y -= 3i; } - y -= 4; - x -= 5; + y -= 4i; + x -= 5i; } } diff --git a/src/test/run-make/graphviz-flowgraph/f16.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f16.dot-expected.dot index 3f999ae3781..9c60e19f8b0 100644 --- a/src/test/run-make/graphviz-flowgraph/f16.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f16.dot-expected.dot @@ -1,43 +1,43 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 16"]; + N2[label="expr 16i"]; N3[label="local mut x"]; - N4[label="expr 16"]; + N4[label="expr 16i"]; N5[label="local mut y"]; N6[label="(dummy_node)"]; - N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l }\l y -= 1;\l x -= 1;\l }\l"]; + N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l }\l y -= 1i;\l x -= 1i;\l }\l"]; N8[label="(dummy_node)"]; - N9[label="expr \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l }\l"]; + N9[label="expr \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l }\l"]; N10[label="expr x"]; - N11[label="expr 1"]; - N12[label="expr x == 1"]; + N11[label="expr 1i"]; + N12[label="expr x == 1i"]; N13[label="expr continue \'outer"]; N14[label="(dummy_node)"]; N15[label="expr \"unreachable\""]; N16[label="block { continue \'outer ; \"unreachable\" }"]; - N17[label="expr if x == 1 { continue \'outer ; \"unreachable\" }"]; + N17[label="expr if x == 1i { continue \'outer ; \"unreachable\" }"]; N18[label="expr y"]; - N19[label="expr 1"]; - N20[label="expr y >= 1"]; + N19[label="expr 1i"]; + N20[label="expr y >= 1i"]; N21[label="expr break"]; N22[label="(dummy_node)"]; N23[label="expr \"unreachable\""]; N24[label="block { break ; \"unreachable\" }"]; - N25[label="expr if y >= 1 { break ; \"unreachable\" }"]; - N26[label="expr 1"]; + N25[label="expr if y >= 1i { break ; \"unreachable\" }"]; + N26[label="expr 1i"]; N27[label="expr y"]; - N28[label="expr y -= 1"]; - N29[label="block {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l}\l"]; - N30[label="expr 1"]; + N28[label="expr y -= 1i"]; + N29[label="block {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l}\l"]; + N30[label="expr 1i"]; N31[label="expr y"]; - N32[label="expr y -= 1"]; - N33[label="expr 1"]; + N32[label="expr y -= 1i"]; + N33[label="expr 1i"]; N34[label="expr x"]; - N35[label="expr x -= 1"]; - N36[label="block {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l }\l y -= 1;\l x -= 1;\l}\l"]; + N35[label="expr x -= 1i"]; + N36[label="block {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l }\l y -= 1i;\l x -= 1i;\l}\l"]; N37[label="expr \"unreachable\""]; - N38[label="block {\l let mut x = 16;\l let mut y = 16;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l }\l y -= 1;\l x -= 1;\l }\l \"unreachable\";\l}\l"]; + N38[label="block {\l let mut x = 16i;\l let mut y = 16i;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l }\l y -= 1i;\l x -= 1i;\l }\l \"unreachable\";\l}\l"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -48,7 +48,7 @@ digraph block { N10 -> N11; N11 -> N12; N12 -> N13; - N13 -> N6[label="exiting scope_0 expr continue \'outer,\lexiting scope_1 stmt continue \'outer ;,\lexiting scope_2 block { continue \'outer ; \"unreachable\" },\lexiting scope_3 expr if x == 1 { continue \'outer ; \"unreachable\" },\lexiting scope_4 stmt if x == 1 { continue \'outer ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l }\l y -= 1;\l x -= 1;\l}\l"]; + N13 -> N6[label="exiting scope_0 expr continue \'outer,\lexiting scope_1 stmt continue \'outer ;,\lexiting scope_2 block { continue \'outer ; \"unreachable\" },\lexiting scope_3 expr if x == 1i { continue \'outer ; \"unreachable\" },\lexiting scope_4 stmt if x == 1i { continue \'outer ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l }\l y -= 1i;\l x -= 1i;\l}\l"]; N14 -> N15; N15 -> N16; N12 -> N17; @@ -57,7 +57,7 @@ digraph block { N18 -> N19; N19 -> N20; N20 -> N21; - N21 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\" },\lexiting scope_3 expr if y >= 1 { break ; \"unreachable\" },\lexiting scope_4 stmt if y >= 1 { break ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1 { continue \'outer ; \"unreachable\" }\l if y >= 1 { break ; \"unreachable\" }\l y -= 1;\l}\l"]; + N21 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\" },\lexiting scope_3 expr if y >= 1i { break ; \"unreachable\" },\lexiting scope_4 stmt if y >= 1i { break ; \"unreachable\" },\lexiting scope_5 block {\l if x == 1i { continue \'outer ; \"unreachable\" }\l if y >= 1i { break ; \"unreachable\" }\l y -= 1i;\l}\l"]; N22 -> N23; N23 -> N24; N20 -> N25; diff --git a/src/test/run-make/graphviz-flowgraph/f16.rs b/src/test/run-make/graphviz-flowgraph/f16.rs index f4f23a65c93..78de99d28fc 100644 --- a/src/test/run-make/graphviz-flowgraph/f16.rs +++ b/src/test/run-make/graphviz-flowgraph/f16.rs @@ -10,22 +10,22 @@ #[allow(unreachable_code)] pub fn expr_continue_label_16() { - let mut x = 16; - let mut y = 16; + let mut x = 16i; + let mut y = 16i; 'outer: loop { 'inner: loop { - if x == 1 { + if x == 1i { continue 'outer; "unreachable" } - if y >= 1 { + if y >= 1i { break; "unreachable" } - y -= 1; + y -= 1i; } - y -= 1; - x -= 1; + y -= 1i; + x -= 1i; } "unreachable"; } diff --git a/src/test/run-make/graphviz-flowgraph/f17.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f17.dot-expected.dot index e9bccdab81b..d3e098a71f2 100644 --- a/src/test/run-make/graphviz-flowgraph/f17.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f17.dot-expected.dot @@ -1,12 +1,12 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 1"]; - N3[label="expr 7"]; - N4[label="expr 17"]; - N5[label="expr [1, 7, 17]"]; + N2[label="expr 1i"]; + N3[label="expr 7i"]; + N4[label="expr 17i"]; + N5[label="expr [1i, 7i, 17i]"]; N6[label="local _v"]; - N7[label="block { let _v = [1, 7, 17]; }"]; + N7[label="block { let _v = [1i, 7i, 17i]; }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f17.rs b/src/test/run-make/graphviz-flowgraph/f17.rs index 23f5bb8a1eb..23ce212c0af 100644 --- a/src/test/run-make/graphviz-flowgraph/f17.rs +++ b/src/test/run-make/graphviz-flowgraph/f17.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn expr_vec_17() { - let _v = [1, 7, 17]; + let _v = [1i, 7i, 17i]; } diff --git a/src/test/run-make/graphviz-flowgraph/f20.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f20.dot-expected.dot index 593ad6f91ea..716ec469fb0 100644 --- a/src/test/run-make/graphviz-flowgraph/f20.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f20.dot-expected.dot @@ -1,15 +1,15 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 2"]; - N3[label="expr 0"]; - N4[label="expr 20"]; - N5[label="expr [2, 0, 20]"]; + N2[label="expr 2u"]; + N3[label="expr 0u"]; + N4[label="expr 20u"]; + N5[label="expr [2u, 0u, 20u]"]; N6[label="local v"]; N7[label="expr v"]; - N8[label="expr 20"]; - N9[label="expr v[20]"]; - N10[label="block { let v = [2, 0, 20]; v[20]; }"]; + N8[label="expr 20u"]; + N9[label="expr v[20u]"]; + N10[label="block { let v = [2u, 0u, 20u]; v[20u]; }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f20.rs b/src/test/run-make/graphviz-flowgraph/f20.rs index d7349932355..7110ebe2b54 100644 --- a/src/test/run-make/graphviz-flowgraph/f20.rs +++ b/src/test/run-make/graphviz-flowgraph/f20.rs @@ -9,6 +9,6 @@ // except according to those terms. pub fn expr_index_20() { - let v = [2, 0, 20]; - v[20]; + let v = [2u, 0u, 20u]; + v[20u]; } diff --git a/src/test/run-make/graphviz-flowgraph/f21.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f21.dot-expected.dot index 0798c4a01c0..2bbc3e7e5c8 100644 --- a/src/test/run-make/graphviz-flowgraph/f21.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f21.dot-expected.dot @@ -1,40 +1,40 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 15"]; + N2[label="expr 15i"]; N3[label="local mut x"]; - N4[label="expr 151"]; + N4[label="expr 151i"]; N5[label="local mut y"]; N6[label="(dummy_node)"]; - N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l \"unreachable\";\l }\l"]; + N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l \"unreachable\";\l }\l"]; N8[label="(dummy_node)"]; - N9[label="expr \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l"]; + N9[label="expr \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l"]; N10[label="expr x"]; - N11[label="expr 1"]; - N12[label="expr x == 1"]; + N11[label="expr 1i"]; + N12[label="expr x == 1i"]; N13[label="expr break \'outer"]; N14[label="(dummy_node)"]; N15[label="expr \"unreachable\""]; N16[label="block { break \'outer ; \"unreachable\"; }"]; - N17[label="expr if x == 1 { break \'outer ; \"unreachable\"; }"]; + N17[label="expr if x == 1i { break \'outer ; \"unreachable\"; }"]; N18[label="expr y"]; - N19[label="expr 2"]; - N20[label="expr y >= 2"]; + N19[label="expr 2i"]; + N20[label="expr y >= 2i"]; N21[label="expr return"]; N22[label="(dummy_node)"]; N23[label="expr \"unreachable\""]; N24[label="block { return; \"unreachable\"; }"]; - N25[label="expr if y >= 2 { return; \"unreachable\"; }"]; - N26[label="expr 3"]; + N25[label="expr if y >= 2i { return; \"unreachable\"; }"]; + N26[label="expr 3i"]; N27[label="expr y"]; - N28[label="expr y -= 3"]; - N29[label="expr 5"]; + N28[label="expr y -= 3i"]; + N29[label="expr 5i"]; N30[label="expr x"]; - N31[label="expr x -= 5"]; - N32[label="block {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l}\l"]; + N31[label="expr x -= 5i"]; + N32[label="block {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l}\l"]; N33[label="expr \"unreachable\""]; - N34[label="block {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l \"unreachable\";\l}\l"]; - N35[label="block {\l let mut x = 15;\l let mut y = 151;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l \"unreachable\";\l }\l}\l"]; + N34[label="block {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l \"unreachable\";\l}\l"]; + N35[label="block {\l let mut x = 15i;\l let mut y = 151i;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l \"unreachable\";\l }\l}\l"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -45,7 +45,7 @@ digraph block { N10 -> N11; N11 -> N12; N12 -> N13; - N13 -> N7[label="exiting scope_0 expr break \'outer,\lexiting scope_1 stmt break \'outer ;,\lexiting scope_2 block { break \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1 { break \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1 { break \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l \"unreachable\";\l}\l"]; + N13 -> N7[label="exiting scope_0 expr break \'outer,\lexiting scope_1 stmt break \'outer ;,\lexiting scope_2 block { break \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1i { break \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1i { break \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l \"unreachable\";\l}\l"]; N14 -> N15; N15 -> N16; N12 -> N17; @@ -54,7 +54,7 @@ digraph block { N18 -> N19; N19 -> N20; N20 -> N21; - N21 -> N1[label="exiting scope_0 expr \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l,\lexiting scope_1 expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l }\l \"unreachable\";\l }\l"]; + N21 -> N1[label="exiting scope_0 expr \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l,\lexiting scope_1 expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { break \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l y -= 3i;\l x -= 5i;\l }\l \"unreachable\";\l }\l"]; N22 -> N23; N23 -> N24; N20 -> N25; diff --git a/src/test/run-make/graphviz-flowgraph/f21.rs b/src/test/run-make/graphviz-flowgraph/f21.rs index 70083ed8312..bff2da25061 100644 --- a/src/test/run-make/graphviz-flowgraph/f21.rs +++ b/src/test/run-make/graphviz-flowgraph/f21.rs @@ -10,20 +10,20 @@ #[allow(unreachable_code)] pub fn expr_break_label_21() { - let mut x = 15; - let mut y = 151; + let mut x = 15i; + let mut y = 151i; 'outer: loop { 'inner: loop { - if x == 1 { + if x == 1i { break 'outer; "unreachable"; } - if y >= 2 { + if y >= 2i { return; "unreachable"; } - y -= 3; - x -= 5; + y -= 3i; + x -= 5i; } "unreachable"; } diff --git a/src/test/run-make/graphviz-flowgraph/f22.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f22.dot-expected.dot index 9ad731bc756..8ecddba21fc 100644 --- a/src/test/run-make/graphviz-flowgraph/f22.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f22.dot-expected.dot @@ -1,41 +1,41 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 15"]; + N2[label="expr 15i"]; N3[label="local mut x"]; - N4[label="expr 151"]; + N4[label="expr 151i"]; N5[label="local mut y"]; N6[label="(dummy_node)"]; - N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l \"unreachable\";\l }\l"]; + N7[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l \"unreachable\";\l }\l"]; N8[label="(dummy_node)"]; - N9[label="expr \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l"]; + N9[label="expr \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l"]; N10[label="expr x"]; - N11[label="expr 1"]; - N12[label="expr x == 1"]; + N11[label="expr 1i"]; + N12[label="expr x == 1i"]; N13[label="expr continue \'outer"]; N14[label="(dummy_node)"]; N15[label="expr \"unreachable\""]; N16[label="block { continue \'outer ; \"unreachable\"; }"]; - N17[label="expr if x == 1 { continue \'outer ; \"unreachable\"; }"]; + N17[label="expr if x == 1i { continue \'outer ; \"unreachable\"; }"]; N18[label="expr y"]; - N19[label="expr 2"]; - N20[label="expr y >= 2"]; + N19[label="expr 2i"]; + N20[label="expr y >= 2i"]; N21[label="expr return"]; N22[label="(dummy_node)"]; N23[label="expr \"unreachable\""]; N24[label="block { return; \"unreachable\"; }"]; - N25[label="expr if y >= 2 { return; \"unreachable\"; }"]; - N26[label="expr 1"]; + N25[label="expr if y >= 2i { return; \"unreachable\"; }"]; + N26[label="expr 1i"]; N27[label="expr x"]; - N28[label="expr x -= 1"]; - N29[label="expr 3"]; + N28[label="expr x -= 1i"]; + N29[label="expr 3i"]; N30[label="expr y"]; - N31[label="expr y -= 3"]; - N32[label="block {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l}\l"]; + N31[label="expr y -= 3i"]; + N32[label="block {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l}\l"]; N33[label="expr \"unreachable\""]; - N34[label="block {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l \"unreachable\";\l}\l"]; + N34[label="block {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l \"unreachable\";\l}\l"]; N35[label="expr \"unreachable\""]; - N36[label="block {\l let mut x = 15;\l let mut y = 151;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l \"unreachable\";\l }\l \"unreachable\";\l}\l"]; + N36[label="block {\l let mut x = 15i;\l let mut y = 151i;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l \"unreachable\";\l }\l \"unreachable\";\l}\l"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -46,7 +46,7 @@ digraph block { N10 -> N11; N11 -> N12; N12 -> N13; - N13 -> N6[label="exiting scope_0 expr continue \'outer,\lexiting scope_1 stmt continue \'outer ;,\lexiting scope_2 block { continue \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1 { continue \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1 { continue \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l \"unreachable\";\l}\l"]; + N13 -> N6[label="exiting scope_0 expr continue \'outer,\lexiting scope_1 stmt continue \'outer ;,\lexiting scope_2 block { continue \'outer ; \"unreachable\"; },\lexiting scope_3 expr if x == 1i { continue \'outer ; \"unreachable\"; },\lexiting scope_4 stmt if x == 1i { continue \'outer ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l}\l,\lexiting scope_6 expr \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l,\lexiting scope_7 stmt \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l,\lexiting scope_8 block {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l \"unreachable\";\l}\l"]; N14 -> N15; N15 -> N16; N12 -> N17; @@ -55,7 +55,7 @@ digraph block { N18 -> N19; N19 -> N20; N20 -> N21; - N21 -> N1[label="exiting scope_0 expr \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l,\lexiting scope_1 expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l }\l \"unreachable\";\l }\l"]; + N21 -> N1[label="exiting scope_0 expr \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l,\lexiting scope_1 expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1i { continue \'outer ; \"unreachable\"; }\l if y >= 2i { return; \"unreachable\"; }\l x -= 1i;\l y -= 3i;\l }\l \"unreachable\";\l }\l"]; N22 -> N23; N23 -> N24; N20 -> N25; diff --git a/src/test/run-make/graphviz-flowgraph/f22.rs b/src/test/run-make/graphviz-flowgraph/f22.rs index b35aac9ec42..a6e3d571deb 100644 --- a/src/test/run-make/graphviz-flowgraph/f22.rs +++ b/src/test/run-make/graphviz-flowgraph/f22.rs @@ -10,20 +10,20 @@ #[allow(unreachable_code)] pub fn expr_break_label_21() { - let mut x = 15; - let mut y = 151; + let mut x = 15i; + let mut y = 151i; 'outer: loop { 'inner: loop { - if x == 1 { + if x == 1i { continue 'outer; "unreachable"; } - if y >= 2 { + if y >= 2i { return; "unreachable"; } - x -= 1; - y -= 3; + x -= 1i; + y -= 3i; } "unreachable"; } diff --git a/src/test/run-make/graphviz-flowgraph/f23.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f23.dot-expected.dot index 876957a0689..718d4687ef9 100644 --- a/src/test/run-make/graphviz-flowgraph/f23.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f23.dot-expected.dot @@ -1,48 +1,48 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 23"]; + N2[label="expr 23i"]; N3[label="local mut x"]; - N4[label="expr 23"]; + N4[label="expr 23i"]; N5[label="local mut y"]; - N6[label="expr 23"]; + N6[label="expr 23i"]; N7[label="local mut z"]; N8[label="(dummy_node)"]; N9[label="expr x"]; - N10[label="expr 0"]; - N11[label="expr x > 0"]; - N12[label="expr while x > 0 {\l x -= 1;\l while y > 0 {\l y -= 1;\l while z > 0 { z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l}\l"]; - N13[label="expr 1"]; + N10[label="expr 0i"]; + N11[label="expr x > 0i"]; + N12[label="expr while x > 0i {\l x -= 1i;\l while y > 0i {\l y -= 1i;\l while z > 0i { z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l}\l"]; + N13[label="expr 1i"]; N14[label="expr x"]; - N15[label="expr x -= 1"]; + N15[label="expr x -= 1i"]; N16[label="(dummy_node)"]; N17[label="expr y"]; - N18[label="expr 0"]; - N19[label="expr y > 0"]; - N20[label="expr while y > 0 {\l y -= 1;\l while z > 0 { z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l}\l"]; - N21[label="expr 1"]; + N18[label="expr 0i"]; + N19[label="expr y > 0i"]; + N20[label="expr while y > 0i {\l y -= 1i;\l while z > 0i { z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l}\l"]; + N21[label="expr 1i"]; N22[label="expr y"]; - N23[label="expr y -= 1"]; + N23[label="expr y -= 1i"]; N24[label="(dummy_node)"]; N25[label="expr z"]; - N26[label="expr 0"]; - N27[label="expr z > 0"]; - N28[label="expr while z > 0 { z -= 1; }"]; - N29[label="expr 1"]; + N26[label="expr 0i"]; + N27[label="expr z > 0i"]; + N28[label="expr while z > 0i { z -= 1i; }"]; + N29[label="expr 1i"]; N30[label="expr z"]; - N31[label="expr z -= 1"]; - N32[label="block { z -= 1; }"]; + N31[label="expr z -= 1i"]; + N32[label="block { z -= 1i; }"]; N33[label="expr x"]; - N34[label="expr 10"]; - N35[label="expr x > 10"]; + N34[label="expr 10i"]; + N35[label="expr x > 10i"]; N36[label="expr return"]; N37[label="(dummy_node)"]; N38[label="expr \"unreachable\""]; N39[label="block { return; \"unreachable\"; }"]; - N40[label="expr if x > 10 { return; \"unreachable\"; }"]; - N41[label="block { y -= 1; while z > 0 { z -= 1; } if x > 10 { return; \"unreachable\"; } }"]; - N42[label="block {\l x -= 1;\l while y > 0 {\l y -= 1;\l while z > 0 { z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l}\l"]; - N43[label="block {\l let mut x = 23;\l let mut y = 23;\l let mut z = 23;\l while x > 0 {\l x -= 1;\l while y > 0 {\l y -= 1;\l while z > 0 { z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l }\l}\l"]; + N40[label="expr if x > 10i { return; \"unreachable\"; }"]; + N41[label="block { y -= 1i; while z > 0i { z -= 1i; } if x > 10i { return; \"unreachable\"; } }"]; + N42[label="block {\l x -= 1i;\l while y > 0i {\l y -= 1i;\l while z > 0i { z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l}\l"]; + N43[label="block {\l let mut x = 23i;\l let mut y = 23i;\l let mut z = 23i;\l while x > 0i {\l x -= 1i;\l while y > 0i {\l y -= 1i;\l while z > 0i { z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l }\l}\l"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -79,7 +79,7 @@ digraph block { N33 -> N34; N34 -> N35; N35 -> N36; - N36 -> N1[label="exiting scope_0 expr while y > 0 {\l y -= 1;\l while z > 0 { z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l}\l,\lexiting scope_1 expr while x > 0 {\l x -= 1;\l while y > 0 {\l y -= 1;\l while z > 0 { z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l}\l"]; + N36 -> N1[label="exiting scope_0 expr while y > 0i {\l y -= 1i;\l while z > 0i { z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l}\l,\lexiting scope_1 expr while x > 0i {\l x -= 1i;\l while y > 0i {\l y -= 1i;\l while z > 0i { z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l}\l"]; N37 -> N38; N38 -> N39; N35 -> N40; diff --git a/src/test/run-make/graphviz-flowgraph/f23.rs b/src/test/run-make/graphviz-flowgraph/f23.rs index 52341a3fbd4..73bcc288ca7 100644 --- a/src/test/run-make/graphviz-flowgraph/f23.rs +++ b/src/test/run-make/graphviz-flowgraph/f23.rs @@ -10,19 +10,19 @@ #[allow(unreachable_code)] pub fn expr_while_23() { - let mut x = 23; - let mut y = 23; - let mut z = 23; + let mut x = 23i; + let mut y = 23i; + let mut z = 23i; - while x > 0 { - x -= 1; + while x > 0i { + x -= 1i; - while y > 0 { - y -= 1; + while y > 0i { + y -= 1i; - while z > 0 { z -= 1; } + while z > 0i { z -= 1i; } - if x > 10 { + if x > 10i { return; "unreachable"; } diff --git a/src/test/run-make/graphviz-flowgraph/f24.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f24.dot-expected.dot index 2558998be6e..646d98a54a7 100644 --- a/src/test/run-make/graphviz-flowgraph/f24.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f24.dot-expected.dot @@ -1,63 +1,63 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 24"]; + N2[label="expr 24i"]; N3[label="local mut x"]; - N4[label="expr 24"]; + N4[label="expr 24i"]; N5[label="local mut y"]; - N6[label="expr 24"]; + N6[label="expr 24i"]; N7[label="local mut z"]; N8[label="(dummy_node)"]; - N9[label="expr loop {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l}\l"]; + N9[label="expr loop {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l}\l"]; N10[label="expr x"]; - N11[label="expr 0"]; - N12[label="expr x == 0"]; + N11[label="expr 0i"]; + N12[label="expr x == 0i"]; N13[label="expr break"]; N14[label="(dummy_node)"]; N15[label="expr \"unreachable\""]; N16[label="block { break ; \"unreachable\"; }"]; - N17[label="expr if x == 0 { break ; \"unreachable\"; }"]; - N18[label="expr 1"]; + N17[label="expr if x == 0i { break ; \"unreachable\"; }"]; + N18[label="expr 1i"]; N19[label="expr x"]; - N20[label="expr x -= 1"]; + N20[label="expr x -= 1i"]; N21[label="(dummy_node)"]; - N22[label="expr loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l}\l"]; + N22[label="expr loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l}\l"]; N23[label="expr y"]; - N24[label="expr 0"]; - N25[label="expr y == 0"]; + N24[label="expr 0i"]; + N25[label="expr y == 0i"]; N26[label="expr break"]; N27[label="(dummy_node)"]; N28[label="expr \"unreachable\""]; N29[label="block { break ; \"unreachable\"; }"]; - N30[label="expr if y == 0 { break ; \"unreachable\"; }"]; - N31[label="expr 1"]; + N30[label="expr if y == 0i { break ; \"unreachable\"; }"]; + N31[label="expr 1i"]; N32[label="expr y"]; - N33[label="expr y -= 1"]; + N33[label="expr y -= 1i"]; N34[label="(dummy_node)"]; - N35[label="expr loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N35[label="expr loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }"]; N36[label="expr z"]; - N37[label="expr 0"]; - N38[label="expr z == 0"]; + N37[label="expr 0i"]; + N38[label="expr z == 0i"]; N39[label="expr break"]; N40[label="(dummy_node)"]; N41[label="expr \"unreachable\""]; N42[label="block { break ; \"unreachable\"; }"]; - N43[label="expr if z == 0 { break ; \"unreachable\"; }"]; - N44[label="expr 1"]; + N43[label="expr if z == 0i { break ; \"unreachable\"; }"]; + N44[label="expr 1i"]; N45[label="expr z"]; - N46[label="expr z -= 1"]; - N47[label="block { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N46[label="expr z -= 1i"]; + N47[label="block { if z == 0i { break ; \"unreachable\"; } z -= 1i; }"]; N48[label="expr x"]; - N49[label="expr 10"]; - N50[label="expr x > 10"]; + N49[label="expr 10i"]; + N50[label="expr x > 10i"]; N51[label="expr return"]; N52[label="(dummy_node)"]; N53[label="expr \"unreachable\""]; N54[label="block { return; \"unreachable\"; }"]; - N55[label="expr if x > 10 { return; \"unreachable\"; }"]; - N56[label="block {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l}\l"]; - N57[label="block {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l}\l"]; - N58[label="block {\l let mut x = 24;\l let mut y = 24;\l let mut z = 24;\l loop {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l }\l}\l"]; + N55[label="expr if x > 10i { return; \"unreachable\"; }"]; + N56[label="block {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l}\l"]; + N57[label="block {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l}\l"]; + N58[label="block {\l let mut x = 24i;\l let mut y = 24i;\l let mut z = 24i;\l loop {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l }\l}\l"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -69,7 +69,7 @@ digraph block { N10 -> N11; N11 -> N12; N12 -> N13; - N13 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 0 { break ; \"unreachable\"; },\lexiting scope_4 stmt if x == 0 { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l}\l"]; + N13 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 0i { break ; \"unreachable\"; },\lexiting scope_4 stmt if x == 0i { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l}\l"]; N14 -> N15; N15 -> N16; N12 -> N17; @@ -82,7 +82,7 @@ digraph block { N23 -> N24; N24 -> N25; N25 -> N26; - N26 -> N22[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y == 0 { break ; \"unreachable\"; },\lexiting scope_4 stmt if y == 0 { break ; \"unreachable\"; },\lexiting scope_5 block {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l}\l"]; + N26 -> N22[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y == 0i { break ; \"unreachable\"; },\lexiting scope_4 stmt if y == 0i { break ; \"unreachable\"; },\lexiting scope_5 block {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l}\l"]; N27 -> N28; N28 -> N29; N25 -> N30; @@ -95,7 +95,7 @@ digraph block { N36 -> N37; N37 -> N38; N38 -> N39; - N39 -> N35[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if z == 0 { break ; \"unreachable\"; },\lexiting scope_4 stmt if z == 0 { break ; \"unreachable\"; },\lexiting scope_5 block { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N39 -> N35[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if z == 0i { break ; \"unreachable\"; },\lexiting scope_4 stmt if z == 0i { break ; \"unreachable\"; },\lexiting scope_5 block { if z == 0i { break ; \"unreachable\"; } z -= 1i; }"]; N40 -> N41; N41 -> N42; N38 -> N43; @@ -109,7 +109,7 @@ digraph block { N48 -> N49; N49 -> N50; N50 -> N51; - N51 -> N1[label="exiting scope_0 expr loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l}\l,\lexiting scope_1 expr loop {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l }\l}\l"]; + N51 -> N1[label="exiting scope_0 expr loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l}\l,\lexiting scope_1 expr loop {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { return; \"unreachable\"; }\l }\l}\l"]; N52 -> N53; N53 -> N54; N50 -> N55; diff --git a/src/test/run-make/graphviz-flowgraph/f24.rs b/src/test/run-make/graphviz-flowgraph/f24.rs index f796d660a18..afba1d202c9 100644 --- a/src/test/run-make/graphviz-flowgraph/f24.rs +++ b/src/test/run-make/graphviz-flowgraph/f24.rs @@ -10,24 +10,24 @@ #[allow(unreachable_code)] pub fn expr_while_24() { - let mut x = 24; - let mut y = 24; - let mut z = 24; + let mut x = 24i; + let mut y = 24i; + let mut z = 24i; loop { - if x == 0 { break; "unreachable"; } - x -= 1; + if x == 0i { break; "unreachable"; } + x -= 1i; loop { - if y == 0 { break; "unreachable"; } - y -= 1; + if y == 0i { break; "unreachable"; } + y -= 1i; loop { - if z == 0 { break; "unreachable"; } - z -= 1; + if z == 0i { break; "unreachable"; } + z -= 1i; } - if x > 10 { + if x > 10i { return; "unreachable"; } diff --git a/src/test/run-make/graphviz-flowgraph/f25.dot-expected.dot b/src/test/run-make/graphviz-flowgraph/f25.dot-expected.dot index c393b63546c..11b9c7ef05e 100644 --- a/src/test/run-make/graphviz-flowgraph/f25.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f25.dot-expected.dot @@ -1,63 +1,63 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 25"]; + N2[label="expr 25i"]; N3[label="local mut x"]; - N4[label="expr 25"]; + N4[label="expr 25i"]; N5[label="local mut y"]; - N6[label="expr 25"]; + N6[label="expr 25i"]; N7[label="local mut z"]; N8[label="(dummy_node)"]; - N9[label="expr \'a:\l loop {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l \'a:\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l }\l }\l"]; + N9[label="expr \'a:\l loop {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l \'a:\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { continue \'a ; \"unreachable\"; }\l }\l }\l"]; N10[label="expr x"]; - N11[label="expr 0"]; - N12[label="expr x == 0"]; + N11[label="expr 0i"]; + N12[label="expr x == 0i"]; N13[label="expr break"]; N14[label="(dummy_node)"]; N15[label="expr \"unreachable\""]; N16[label="block { break ; \"unreachable\"; }"]; - N17[label="expr if x == 0 { break ; \"unreachable\"; }"]; - N18[label="expr 1"]; + N17[label="expr if x == 0i { break ; \"unreachable\"; }"]; + N18[label="expr 1i"]; N19[label="expr x"]; - N20[label="expr x -= 1"]; + N20[label="expr x -= 1i"]; N21[label="(dummy_node)"]; - N22[label="expr \'a:\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l }\l"]; + N22[label="expr \'a:\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { continue \'a ; \"unreachable\"; }\l }\l"]; N23[label="expr y"]; - N24[label="expr 0"]; - N25[label="expr y == 0"]; + N24[label="expr 0i"]; + N25[label="expr y == 0i"]; N26[label="expr break"]; N27[label="(dummy_node)"]; N28[label="expr \"unreachable\""]; N29[label="block { break ; \"unreachable\"; }"]; - N30[label="expr if y == 0 { break ; \"unreachable\"; }"]; - N31[label="expr 1"]; + N30[label="expr if y == 0i { break ; \"unreachable\"; }"]; + N31[label="expr 1i"]; N32[label="expr y"]; - N33[label="expr y -= 1"]; + N33[label="expr y -= 1i"]; N34[label="(dummy_node)"]; - N35[label="expr \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N35[label="expr \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }"]; N36[label="expr z"]; - N37[label="expr 0"]; - N38[label="expr z == 0"]; + N37[label="expr 0i"]; + N38[label="expr z == 0i"]; N39[label="expr break"]; N40[label="(dummy_node)"]; N41[label="expr \"unreachable\""]; N42[label="block { break ; \"unreachable\"; }"]; - N43[label="expr if z == 0 { break ; \"unreachable\"; }"]; - N44[label="expr 1"]; + N43[label="expr if z == 0i { break ; \"unreachable\"; }"]; + N44[label="expr 1i"]; N45[label="expr z"]; - N46[label="expr z -= 1"]; - N47[label="block { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N46[label="expr z -= 1i"]; + N47[label="block { if z == 0i { break ; \"unreachable\"; } z -= 1i; }"]; N48[label="expr x"]; - N49[label="expr 10"]; - N50[label="expr x > 10"]; + N49[label="expr 10i"]; + N50[label="expr x > 10i"]; N51[label="expr continue \'a"]; N52[label="(dummy_node)"]; N53[label="expr \"unreachable\""]; N54[label="block { continue \'a ; \"unreachable\"; }"]; - N55[label="expr if x > 10 { continue \'a ; \"unreachable\"; }"]; - N56[label="block {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l}\l"]; - N57[label="block {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l \'a:\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l }\l}\l"]; - N58[label="block {\l let mut x = 25;\l let mut y = 25;\l let mut z = 25;\l \'a:\l loop {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l \'a:\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l }\l }\l}\l"]; + N55[label="expr if x > 10i { continue \'a ; \"unreachable\"; }"]; + N56[label="block {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { continue \'a ; \"unreachable\"; }\l}\l"]; + N57[label="block {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l \'a:\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { continue \'a ; \"unreachable\"; }\l }\l}\l"]; + N58[label="block {\l let mut x = 25i;\l let mut y = 25i;\l let mut z = 25i;\l \'a:\l loop {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l \'a:\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a:\l loop {\l if z == 0i { break ; \"unreachable\"; }\l z -= 1i;\l }\l if x > 10i { continue \'a ; \"unreachable\"; }\l }\l }\l}\l"]; N0 -> N2; N2 -> N3; N3 -> N4; @@ -69,7 +69,7 @@ digraph block { N10 -> N11; N11 -> N12; N12 -> N13; - N13 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 0 { break ; \"unreachable\"; },\lexiting scope_4 stmt if x == 0 { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 0 { break ; \"unreachable\"; }\l x -= 1;\l \'a:\l loop {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l }\l}\l"]; + N13 -> N9[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if x == 0i { break ; \"unreachable\"; },\lexiting scope_4 stmt if x == 0i { break ; \"unreachable\"; },\lexiting scope_5 block {\l if x == 0i { break ; \"unreachable\"; }\l x -= 1i;\l \'a:\l loop {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { continue \'a ; \"unreachable\"; }\l }\l}\l"]; N14 -> N15; N15 -> N16; N12 -> N17; @@ -82,7 +82,7 @@ digraph block { N23 -> N24; N24 -> N25; N25 -> N26; - N26 -> N22[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y == 0 { break ; \"unreachable\"; },\lexiting scope_4 stmt if y == 0 { break ; \"unreachable\"; },\lexiting scope_5 block {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l}\l"]; + N26 -> N22[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if y == 0i { break ; \"unreachable\"; },\lexiting scope_4 stmt if y == 0i { break ; \"unreachable\"; },\lexiting scope_5 block {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { continue \'a ; \"unreachable\"; }\l}\l"]; N27 -> N28; N28 -> N29; N25 -> N30; @@ -95,7 +95,7 @@ digraph block { N36 -> N37; N37 -> N38; N38 -> N39; - N39 -> N35[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if z == 0 { break ; \"unreachable\"; },\lexiting scope_4 stmt if z == 0 { break ; \"unreachable\"; },\lexiting scope_5 block { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N39 -> N35[label="exiting scope_0 expr break,\lexiting scope_1 stmt break ;,\lexiting scope_2 block { break ; \"unreachable\"; },\lexiting scope_3 expr if z == 0i { break ; \"unreachable\"; },\lexiting scope_4 stmt if z == 0i { break ; \"unreachable\"; },\lexiting scope_5 block { if z == 0i { break ; \"unreachable\"; } z -= 1i; }"]; N40 -> N41; N41 -> N42; N38 -> N43; @@ -109,7 +109,7 @@ digraph block { N48 -> N49; N49 -> N50; N50 -> N51; - N51 -> N21[label="exiting scope_0 expr continue \'a,\lexiting scope_1 stmt continue \'a ;,\lexiting scope_2 block { continue \'a ; \"unreachable\"; },\lexiting scope_3 expr if x > 10 { continue \'a ; \"unreachable\"; },\lexiting scope_4 block {\l if y == 0 { break ; \"unreachable\"; }\l y -= 1;\l \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }\l if x > 10 { continue \'a ; \"unreachable\"; }\l}\l"]; + N51 -> N21[label="exiting scope_0 expr continue \'a,\lexiting scope_1 stmt continue \'a ;,\lexiting scope_2 block { continue \'a ; \"unreachable\"; },\lexiting scope_3 expr if x > 10i { continue \'a ; \"unreachable\"; },\lexiting scope_4 block {\l if y == 0i { break ; \"unreachable\"; }\l y -= 1i;\l \'a: loop { if z == 0i { break ; \"unreachable\"; } z -= 1i; }\l if x > 10i { continue \'a ; \"unreachable\"; }\l}\l"]; N52 -> N53; N53 -> N54; N50 -> N55; diff --git a/src/test/run-make/graphviz-flowgraph/f25.rs b/src/test/run-make/graphviz-flowgraph/f25.rs index 2ee2e48fd10..933f95f228c 100644 --- a/src/test/run-make/graphviz-flowgraph/f25.rs +++ b/src/test/run-make/graphviz-flowgraph/f25.rs @@ -10,24 +10,24 @@ #[allow(unreachable_code)] pub fn expr_while_25() { - let mut x = 25; - let mut y = 25; - let mut z = 25; + let mut x = 25i; + let mut y = 25i; + let mut z = 25i; 'a: loop { - if x == 0 { break; "unreachable"; } - x -= 1; + if x == 0i { break; "unreachable"; } + x -= 1i; 'a: loop { - if y == 0 { break; "unreachable"; } - y -= 1; + if y == 0i { break; "unreachable"; } + y -= 1i; 'a: loop { - if z == 0 { break; "unreachable"; } - z -= 1; + if z == 0i { break; "unreachable"; } + z -= 1i; } - if x > 10 { + if x > 10i { continue 'a; "unreachable"; } diff --git a/src/test/run-make/static-unwinding/main.rs b/src/test/run-make/static-unwinding/main.rs index 08777490f21..9fe78cc2553 100644 --- a/src/test/run-make/static-unwinding/main.rs +++ b/src/test/run-make/static-unwinding/main.rs @@ -25,7 +25,7 @@ fn main() { task::try(proc() { let _a = A; lib::callback(|| fail!()); - 1 + 1i }); unsafe { diff --git a/src/test/run-pass/auto-instantiate.rs b/src/test/run-pass/auto-instantiate.rs index f1fe1e94587..5167764dd28 100644 --- a/src/test/run-pass/auto-instantiate.rs +++ b/src/test/run-pass/auto-instantiate.rs @@ -16,6 +16,6 @@ struct Triple { x: int, y: int, z: int } fn f<T,U>(x: T, y: U) -> Pair<T, U> { return Pair {a: x, b: y}; } pub fn main() { - println!("{:?}", f(Triple {x: 3, y: 4, z: 5}, 4).a.x); + println!("{:?}", f(Triple {x: 3, y: 4, z: 5}, 4i).a.x); println!("{:?}", f(5i, 6i).a); } diff --git a/src/test/run-pass/builtin-superkinds-self-type.rs b/src/test/run-pass/builtin-superkinds-self-type.rs index d0ccfe0e21d..1c156f6551c 100644 --- a/src/test/run-pass/builtin-superkinds-self-type.rs +++ b/src/test/run-pass/builtin-superkinds-self-type.rs @@ -21,6 +21,6 @@ impl <T: Send> Foo for T { } pub fn main() { let (tx, rx) = channel(); - 1193182.foo(tx); - assert!(rx.recv() == 1193182); + 1193182i.foo(tx); + assert!(rx.recv() == 1193182i); } diff --git a/src/test/run-pass/class-poly-methods.rs b/src/test/run-pass/class-poly-methods.rs index 4f94673a2c0..d94547a4dda 100644 --- a/src/test/run-pass/class-poly-methods.rs +++ b/src/test/run-pass/class-poly-methods.rs @@ -36,7 +36,7 @@ pub fn main() { let mut kitty = cat(1000u, 2, vec!("tabby".to_string())); assert_eq!(nyan.how_hungry, 99); assert_eq!(kitty.how_hungry, 2); - nyan.speak(vec!(1,2,3)); + nyan.speak(vec!(1i,2,3)); assert_eq!(nyan.meow_count(), 55u); kitty.speak(vec!("meow".to_string(), "mew".to_string(), "purr".to_string(), "chirp".to_string())); assert_eq!(kitty.meow_count(), 1004u); diff --git a/src/test/run-pass/cleanup-rvalue-scopes.rs b/src/test/run-pass/cleanup-rvalue-scopes.rs index 470e16b4888..35c69705925 100644 --- a/src/test/run-pass/cleanup-rvalue-scopes.rs +++ b/src/test/run-pass/cleanup-rvalue-scopes.rs @@ -110,7 +110,7 @@ pub fn main() { end_of_block!(ref _x, AddFlags(1)); end_of_block!(AddFlags { bits: ref _x }, AddFlags(1)); end_of_block!(&AddFlags { bits }, &AddFlags(1)); - end_of_block!((_, ref _y), (AddFlags(1), 22)); + end_of_block!((_, ref _y), (AddFlags(1), 22i)); end_of_block!(box ref _x, box AddFlags(1)); end_of_block!(box _x, box AddFlags(1)); end_of_block!(_, { { check_flags(0); &AddFlags(1) } }); @@ -120,7 +120,7 @@ pub fn main() { // LHS does not create a ref binding, so temporary lives as long // as statement, and we do not move the AddFlags out: end_of_stmt!(_, AddFlags(1)); - end_of_stmt!((_, _), (AddFlags(1), 22)); + end_of_stmt!((_, _), (AddFlags(1), 22i)); // `&` operator appears inside an arg to a function, // so it is not prolonged: diff --git a/src/test/run-pass/const-binops.rs b/src/test/run-pass/const-binops.rs index be186a95a77..c14f430e709 100644 --- a/src/test/run-pass/const-binops.rs +++ b/src/test/run-pass/const-binops.rs @@ -53,28 +53,28 @@ static V: int = 1 << 3; static W: int = 1024 >> 4; static X: uint = 1024 >> 4; -static Y: bool = 1 == 1; -static Z: bool = 1.0 == 1.0; +static Y: bool = 1i == 1; +static Z: bool = 1.0f64 == 1.0; -static AA: bool = 1 <= 2; -static AB: bool = -1 <= 2; -static AC: bool = 1.0 <= 2.0; +static AA: bool = 1i <= 2; +static AB: bool = -1i <= 2; +static AC: bool = 1.0f64 <= 2.0; -static AD: bool = 1 < 2; -static AE: bool = -1 < 2; -static AF: bool = 1.0 < 2.0; +static AD: bool = 1i < 2; +static AE: bool = -1i < 2; +static AF: bool = 1.0f64 < 2.0; -static AG: bool = 1 != 2; -static AH: bool = -1 != 2; -static AI: bool = 1.0 != 2.0; +static AG: bool = 1i != 2; +static AH: bool = -1i != 2; +static AI: bool = 1.0f64 != 2.0; -static AJ: bool = 2 >= 1; -static AK: bool = 2 >= -2; -static AL: bool = 1.0 >= -2.0; +static AJ: bool = 2i >= 1; +static AK: bool = 2i >= -2; +static AL: bool = 1.0f64 >= -2.0; -static AM: bool = 2 > 1; -static AN: bool = 2 > -2; -static AO: bool = 1.0 > -2.0; +static AM: bool = 2i > 1; +static AN: bool = 2i > -2; +static AO: bool = 1.0f64 > -2.0; pub fn main() { assert_eq!(A, -1); diff --git a/src/test/run-pass/const-bound.rs b/src/test/run-pass/const-bound.rs index 7ca4e25a74d..08912419b5c 100644 --- a/src/test/run-pass/const-bound.rs +++ b/src/test/run-pass/const-bound.rs @@ -23,5 +23,5 @@ pub fn main() { foo(F{field: 42}); foo((1, 2u)); foo(@1);*/ - foo(box 1); + foo(box 1i); } diff --git a/src/test/run-pass/drop-trait-generic.rs b/src/test/run-pass/drop-trait-generic.rs index 4ba3aa70dfc..9a93873f538 100644 --- a/src/test/run-pass/drop-trait-generic.rs +++ b/src/test/run-pass/drop-trait-generic.rs @@ -22,5 +22,5 @@ impl<T> ::std::ops::Drop for S<T> { } pub fn main() { - let _x = S { x: 1 }; + let _x = S { x: 1i }; } diff --git a/src/test/run-pass/early-ret-binop-add.rs b/src/test/run-pass/early-ret-binop-add.rs index 97e873e9aff..b9efdeb3bed 100644 --- a/src/test/run-pass/early-ret-binop-add.rs +++ b/src/test/run-pass/early-ret-binop-add.rs @@ -8,5 +8,5 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn wsucc(n: int) -> int { 0 + { return n + 1 } } +fn wsucc(n: int) -> int { 0i + { return n + 1 } } pub fn main() { } diff --git a/src/test/run-pass/else-if.rs b/src/test/run-pass/else-if.rs index 476d3f42d6e..63f32ae702b 100644 --- a/src/test/run-pass/else-if.rs +++ b/src/test/run-pass/else-if.rs @@ -11,20 +11,20 @@ pub fn main() { - if 1 == 2 { + if 1i == 2 { assert!((false)); - } else if 2 == 3 { + } else if 2i == 3 { assert!((false)); - } else if 3 == 4 { assert!((false)); } else { assert!((true)); } - if 1 == 2 { assert!((false)); } else if 2 == 2 { assert!((true)); } - if 1 == 2 { + } else if 3i == 4 { assert!((false)); } else { assert!((true)); } + if 1i == 2 { assert!((false)); } else if 2i == 2 { assert!((true)); } + if 1i == 2 { assert!((false)); - } else if 2 == 2 { - if 1 == 1 { + } else if 2i == 2 { + if 1i == 1 { assert!((true)); - } else { if 2 == 1 { assert!((false)); } else { assert!((false)); } } + } else { if 2i == 1 { assert!((false)); } else { assert!((false)); } } } - if 1 == 2 { + if 1i == 2 { assert!((false)); - } else { if 1 == 2 { assert!((false)); } else { assert!((true)); } } + } else { if 1i == 2 { assert!((false)); } else { assert!((true)); } } } diff --git a/src/test/run-pass/enum-discr.rs b/src/test/run-pass/enum-discr.rs index 1d7ec0aa1bc..5fe8bb27e15 100644 --- a/src/test/run-pass/enum-discr.rs +++ b/src/test/run-pass/enum-discr.rs @@ -9,10 +9,10 @@ // except according to those terms. enum Animal { - Cat = 0u, - Dog = 1u, - Horse = 2u, - Snake = 3u + Cat = 0, + Dog = 1, + Horse = 2, + Snake = 3, } enum Hero { diff --git a/src/test/run-pass/enum-discrim-width-stuff.rs b/src/test/run-pass/enum-discrim-width-stuff.rs index 814e2cca97c..ccbc5d12191 100644 --- a/src/test/run-pass/enum-discrim-width-stuff.rs +++ b/src/test/run-pass/enum-discrim-width-stuff.rs @@ -23,8 +23,8 @@ macro_rules! check { static C: E = V; pub fn check() { assert_eq!(size_of::<E>(), size_of::<$t>()); - assert_eq!(V as $t, $v); - assert_eq!(C as $t, $v); + assert_eq!(V as $t, $v as $t); + assert_eq!(C as $t, $v as $t); assert_eq!(format!("{:?}", V), "V".to_string()); assert_eq!(format!("{:?}", C), "V".to_string()); } @@ -40,8 +40,6 @@ pub fn main() { check!(d, u16, 0xe8d8); check!(e, u32, 0x17273747); check!(f, u32, 0xe8d8c8b8); - check!(g, u64, 0x1727374757677787u64); - check!(h, u64, 0xe8d8c8b8a8988878u64); check!(z, i8, 0x17); check!(y, i8, -0x17); @@ -49,8 +47,6 @@ pub fn main() { check!(w, i16, -0x1727); check!(v, i32, 0x17273747); check!(u, i32, -0x17273747); - check!(t, i64, 0x1727374757677787); - check!(s, i64, -0x1727374757677787); enum Simple { A, B } assert_eq!(::std::mem::size_of::<Simple>(), 1); diff --git a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs index 4ddff8d899a..da35ffb5295 100644 --- a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs +++ b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs @@ -20,8 +20,8 @@ use std::gc::{Gc, GC}; enum List<X> { Nil, Cons(X, Gc<List<X>>) } pub fn main() { - match Cons(10, box(GC) Nil) { - Cons(10, _) => {} + match Cons(10i, box(GC) Nil) { + Cons(10i, _) => {} Nil => {} _ => fail!() } diff --git a/src/test/run-pass/enum-vec-initializer.rs b/src/test/run-pass/enum-vec-initializer.rs index a55b5eebefb..b04f5e11042 100644 --- a/src/test/run-pass/enum-vec-initializer.rs +++ b/src/test/run-pass/enum-vec-initializer.rs @@ -16,9 +16,9 @@ static BAR:uint = Bunny as uint; static BAR2:uint = BAR; pub fn main() { - let _v = [0, .. Bunny as uint]; - let _v = [0, .. BAR]; - let _v = [0, .. BAR2]; + let _v = [0i, .. Bunny as uint]; + let _v = [0i, .. BAR]; + let _v = [0i, .. BAR2]; static BAR3:uint = BAR2; - let _v = [0, .. BAR3]; + let _v = [0i, .. BAR3]; } diff --git a/src/test/run-pass/expr-block-box.rs b/src/test/run-pass/expr-block-box.rs index b9d005d945f..5652cdea879 100644 --- a/src/test/run-pass/expr-block-box.rs +++ b/src/test/run-pass/expr-block-box.rs @@ -12,4 +12,4 @@ use std::gc::GC; -pub fn main() { let x = { box(GC) 100 }; assert!((*x == 100)); } +pub fn main() { let x = { box(GC) 100i }; assert!((*x == 100)); } diff --git a/src/test/run-pass/expr-block-ref.rs b/src/test/run-pass/expr-block-ref.rs index df7ea0c943b..050ecebb2a1 100644 --- a/src/test/run-pass/expr-block-ref.rs +++ b/src/test/run-pass/expr-block-ref.rs @@ -13,4 +13,4 @@ use std::gc::GC; // Regression test for issue #388 -pub fn main() { let _x = { { box(GC) 10 } }; } +pub fn main() { let _x = { { box(GC) 10i } }; } diff --git a/src/test/run-pass/expr-block-unique.rs b/src/test/run-pass/expr-block-unique.rs index 12777bce710..0dff989002f 100644 --- a/src/test/run-pass/expr-block-unique.rs +++ b/src/test/run-pass/expr-block-unique.rs @@ -11,4 +11,4 @@ -pub fn main() { let x = { box 100 }; assert!((*x == 100)); } +pub fn main() { let x = { box 100i }; assert!((*x == 100)); } diff --git a/src/test/run-pass/expr-empty-ret.rs b/src/test/run-pass/expr-empty-ret.rs index afc7dfaf9b4..7b08251967e 100644 --- a/src/test/run-pass/expr-empty-ret.rs +++ b/src/test/run-pass/expr-empty-ret.rs @@ -12,7 +12,7 @@ fn f() { let _x = match true { - true => { 10 } + true => { 10i } false => { return } }; } diff --git a/src/test/run-pass/expr-if-fail-all.rs b/src/test/run-pass/expr-if-fail-all.rs index a34620d2e1b..8e56011e6dc 100644 --- a/src/test/run-pass/expr-if-fail-all.rs +++ b/src/test/run-pass/expr-if-fail-all.rs @@ -12,7 +12,7 @@ // expression results in fail. pub fn main() { let _x = if true { - 10 + 10i } else { if true { fail!() } else { fail!() } }; diff --git a/src/test/run-pass/expr-if-fail.rs b/src/test/run-pass/expr-if-fail.rs index 023ba508ae5..e9f116fcdd4 100644 --- a/src/test/run-pass/expr-if-fail.rs +++ b/src/test/run-pass/expr-if-fail.rs @@ -8,7 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn test_if_fail() { let x = if false { fail!() } else { 10 }; assert!((x == 10)); } +fn test_if_fail() { + let x = if false { fail!() } else { 10i }; + assert!((x == 10)); +} fn test_else_fail() { let x = if true { 10i } else { fail!() }; @@ -16,7 +19,7 @@ fn test_else_fail() { } fn test_elseif_fail() { - let x = if false { 0 } else if false { fail!() } else { 10i }; + let x = if false { 0i } else if false { fail!() } else { 10i }; assert_eq!(x, 10i); } diff --git a/src/test/run-pass/expr-match-fail-all.rs b/src/test/run-pass/expr-match-fail-all.rs index 5c83e81d8be..0d23098d8fc 100644 --- a/src/test/run-pass/expr-match-fail-all.rs +++ b/src/test/run-pass/expr-match-fail-all.rs @@ -16,7 +16,7 @@ pub fn main() { let _x = match true { - true => { 10 } + true => { 10i } false => { match true { true => { fail!() } false => { fail!() } } } }; } diff --git a/src/test/run-pass/floatlits.rs b/src/test/run-pass/floatlits.rs index d1300e7f30c..09df423d2da 100644 --- a/src/test/run-pass/floatlits.rs +++ b/src/test/run-pass/floatlits.rs @@ -11,10 +11,10 @@ pub fn main() { - let f = 4.999999999999; - assert!((f > 4.90)); - assert!((f < 5.0)); - let g = 4.90000000001e-10; - assert!((g > 5e-11)); - assert!((g < 5e-9)); + let f = 4.999999999999f64; + assert!((f > 4.90f64)); + assert!((f < 5.0f64)); + let g = 4.90000000001e-10f64; + assert!((g > 5e-11f64)); + assert!((g < 5e-9f64)); } diff --git a/src/test/run-pass/fn-type-infer.rs b/src/test/run-pass/fn-type-infer.rs index 34417891197..80d3527736f 100644 --- a/src/test/run-pass/fn-type-infer.rs +++ b/src/test/run-pass/fn-type-infer.rs @@ -13,6 +13,6 @@ pub fn main() { // We should be able to type infer inside of ||s. let _f = || { - let i = 10; + let i = 10i; }; } diff --git a/src/test/run-pass/foreach-external-iterators-break.rs b/src/test/run-pass/foreach-external-iterators-break.rs index 87ed7826fed..d9d3e320260 100644 --- a/src/test/run-pass/foreach-external-iterators-break.rs +++ b/src/test/run-pass/foreach-external-iterators-break.rs @@ -9,8 +9,8 @@ // except according to those terms. pub fn main() { - let x = [1,..100]; - let mut y = 0; + let x = [1i,..100]; + let mut y = 0i; for i in x.iter() { if y > 10 { break; diff --git a/src/test/run-pass/foreach-external-iterators-nested.rs b/src/test/run-pass/foreach-external-iterators-nested.rs index 78aba778421..f4d38dfcfc3 100644 --- a/src/test/run-pass/foreach-external-iterators-nested.rs +++ b/src/test/run-pass/foreach-external-iterators-nested.rs @@ -9,10 +9,10 @@ // except according to those terms. pub fn main() { - let x = [1,..100]; - let y = [2,..100]; - let mut p = 0; - let mut q = 0; + let x = [1i,..100]; + let y = [2i,..100]; + let mut p = 0i; + let mut q = 0i; for i in x.iter() { for j in y.iter() { p += *j; diff --git a/src/test/run-pass/foreach-external-iterators.rs b/src/test/run-pass/foreach-external-iterators.rs index 593a996d8df..684a9b81fb2 100644 --- a/src/test/run-pass/foreach-external-iterators.rs +++ b/src/test/run-pass/foreach-external-iterators.rs @@ -9,8 +9,8 @@ // except according to those terms. pub fn main() { - let x = [1,..100]; - let mut y = 0; + let x = [1i,..100]; + let mut y = 0i; for i in x.iter() { y += *i } diff --git a/src/test/run-pass/foreign-call-no-runtime.rs b/src/test/run-pass/foreign-call-no-runtime.rs index 21238e68b31..9dd52dfb6da 100644 --- a/src/test/run-pass/foreign-call-no-runtime.rs +++ b/src/test/run-pass/foreign-call-no-runtime.rs @@ -22,7 +22,7 @@ extern { pub fn main() { unsafe { Thread::start(proc() { - let i = &100; + let i = &100i; rust_dbg_call(callback, mem::transmute(i)); }).join(); } @@ -31,6 +31,6 @@ pub fn main() { extern fn callback(data: libc::uintptr_t) { unsafe { let data: *const int = mem::transmute(data); - assert_eq!(*data, 100); + assert_eq!(*data, 100i); } } diff --git a/src/test/run-pass/generic-ivec-leak.rs b/src/test/run-pass/generic-ivec-leak.rs index f879e195292..ac97a2aa9e8 100644 --- a/src/test/run-pass/generic-ivec-leak.rs +++ b/src/test/run-pass/generic-ivec-leak.rs @@ -10,4 +10,4 @@ enum wrapper<T> { wrapped(T), } -pub fn main() { let _w = wrapped(vec!(1, 2, 3, 4, 5)); } +pub fn main() { let _w = wrapped(vec!(1i, 2, 3, 4, 5)); } diff --git a/src/test/run-pass/generic-ivec.rs b/src/test/run-pass/generic-ivec.rs index 18d1b7f03a1..4402dd35d09 100644 --- a/src/test/run-pass/generic-ivec.rs +++ b/src/test/run-pass/generic-ivec.rs @@ -13,4 +13,4 @@ use std::gc::{Gc, GC}; fn f<T>(_v: Gc<T>) { } -pub fn main() { f(box(GC) vec!(1, 2, 3, 4, 5)); } +pub fn main() { f(box(GC) vec!(1i, 2, 3, 4, 5)); } diff --git a/src/test/run-pass/generic-tag-local.rs b/src/test/run-pass/generic-tag-local.rs index fb8140790e3..7d011e57671 100644 --- a/src/test/run-pass/generic-tag-local.rs +++ b/src/test/run-pass/generic-tag-local.rs @@ -12,4 +12,4 @@ enum clam<T> { a(T), } -pub fn main() { let _c = a(3); } +pub fn main() { let _c = a(3i); } diff --git a/src/test/run-pass/guards.rs b/src/test/run-pass/guards.rs index 450620767e3..5bfbe4bf5a0 100644 --- a/src/test/run-pass/guards.rs +++ b/src/test/run-pass/guards.rs @@ -12,14 +12,14 @@ struct Pair { x: int, y: int } pub fn main() { let a: int = - match 10 { x if x < 7 => { 1 } x if x < 11 => { 2 } 10 => { 3 } _ => { 4 } }; + match 10i { x if x < 7 => { 1i } x if x < 11 => { 2i } 10 => { 3i } _ => { 4i } }; assert_eq!(a, 2); let b: int = match (Pair {x: 10, y: 20}) { - x if x.x < 5 && x.y < 5 => { 1 } - Pair {x: x, y: y} if x == 10 && y == 20 => { 2 } - Pair {x: _x, y: _y} => { 3 } + x if x.x < 5 && x.y < 5 => { 1i } + Pair {x: x, y: y} if x == 10 && y == 20 => { 2i } + Pair {x: _x, y: _y} => { 3i } }; assert_eq!(b, 2); } diff --git a/src/test/run-pass/hygiene-dodging-1.rs b/src/test/run-pass/hygiene-dodging-1.rs index 3969394a26b..eb81f82a146 100644 --- a/src/test/run-pass/hygiene-dodging-1.rs +++ b/src/test/run-pass/hygiene-dodging-1.rs @@ -14,7 +14,7 @@ mod x { pub fn main(){ // should *not* shadow the module x: - let x = 9; + let x = 9i; // use it to avoid warnings: x+3; assert_eq!(x::g(),14); diff --git a/src/test/run-pass/ignore-all-the-things.rs b/src/test/run-pass/ignore-all-the-things.rs index b176254a878..27c63d425bf 100644 --- a/src/test/run-pass/ignore-all-the-things.rs +++ b/src/test/run-pass/ignore-all-the-things.rs @@ -21,28 +21,28 @@ pub fn main() { //let (a, b, ..) = (5, 5, 5, 5); //let (.., c, d) = (5, 5, 5, 5); let Bar{b: b, ..} = Bar{a: 5, b: 5, c: 5, d: 5}; - match [5, 5, 5, 5] { + match [5i, 5, 5, 5] { [..] => { } } - match [5, 5, 5, 5] { + match [5i, 5, 5, 5] { [a, ..] => { } } - match [5, 5, 5, 5] { + match [5i, 5, 5, 5] { [.., b] => { } } - match [5, 5, 5, 5] { + match [5i, 5, 5, 5] { [a, .., b] => { } } - match [5, 5, 5] { + match [5i, 5, 5] { [..] => { } } - match [5, 5, 5] { + match [5i, 5, 5] { [a, ..] => { } } - match [5, 5, 5] { + match [5i, 5, 5] { [.., a] => { } } - match [5, 5, 5] { + match [5i, 5, 5] { [a, .., b] => { } } } diff --git a/src/test/run-pass/import-in-block.rs b/src/test/run-pass/import-in-block.rs index 24196c22571..19300569d20 100644 --- a/src/test/run-pass/import-in-block.rs +++ b/src/test/run-pass/import-in-block.rs @@ -12,11 +12,11 @@ pub fn main() { use std::mem::replace; - let mut x = 5; + let mut x = 5i; replace(&mut x, 6); { use std::mem::*; - let mut y = 6; + let mut y = 6i; swap(&mut x, &mut y); } } diff --git a/src/test/run-pass/import4.rs b/src/test/run-pass/import4.rs index 44f6b6140fb..0639d732089 100644 --- a/src/test/run-pass/import4.rs +++ b/src/test/run-pass/import4.rs @@ -16,4 +16,4 @@ mod zed { pub fn bar() { println!("bar"); } } -pub fn main() { let _zed = 42; bar(); } +pub fn main() { let _zed = 42i; bar(); } diff --git a/src/test/run-pass/inferred-suffix-in-pattern-range.rs b/src/test/run-pass/inferred-suffix-in-pattern-range.rs index b2b16c4ef84..a7b2a46f0c3 100644 --- a/src/test/run-pass/inferred-suffix-in-pattern-range.rs +++ b/src/test/run-pass/inferred-suffix-in-pattern-range.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - let x = 2; + let x = 2i; let x_message = match x { 0 .. 1 => { "not many".to_string() } _ => { "lots".to_string() } diff --git a/src/test/run-pass/init-res-into-things.rs b/src/test/run-pass/init-res-into-things.rs index 5e0aeeb6bed..5d4f6458cf9 100644 --- a/src/test/run-pass/init-res-into-things.rs +++ b/src/test/run-pass/init-res-into-things.rs @@ -36,7 +36,7 @@ fn r(i: Gc<Cell<int>>) -> r { } fn test_box() { - let i = box(GC) Cell::new(0); + let i = box(GC) Cell::new(0i); { let _a = box(GC) r(i); } @@ -44,7 +44,7 @@ fn test_box() { } fn test_rec() { - let i = box(GC) Cell::new(0); + let i = box(GC) Cell::new(0i); { let _a = Box {x: r(i)}; } @@ -56,7 +56,7 @@ fn test_tag() { t0(r), } - let i = box(GC) Cell::new(0); + let i = box(GC) Cell::new(0i); { let _a = t0(r(i)); } @@ -64,15 +64,15 @@ fn test_tag() { } fn test_tup() { - let i = box(GC) Cell::new(0); + let i = box(GC) Cell::new(0i); { - let _a = (r(i), 0); + let _a = (r(i), 0i); } assert_eq!(i.get(), 1); } fn test_unique() { - let i = box(GC) Cell::new(0); + let i = box(GC) Cell::new(0i); { let _a = box r(i); } @@ -80,7 +80,7 @@ fn test_unique() { } fn test_box_rec() { - let i = box(GC) Cell::new(0); + let i = box(GC) Cell::new(0i); { let _a = box(GC) Box { x: r(i) diff --git a/src/test/run-pass/issue-10638.rs b/src/test/run-pass/issue-10638.rs index bc77b4c5343..a4ef77df311 100644 --- a/src/test/run-pass/issue-10638.rs +++ b/src/test/run-pass/issue-10638.rs @@ -13,6 +13,6 @@ pub fn main() { ////////////////// still not a doc comment /////**** nope, me neither */ /*** And neither am I! */ - 5; + 5i; /*****! certainly not I */ } diff --git a/src/test/run-pass/issue-1257.rs b/src/test/run-pass/issue-1257.rs index 7d5bd9d6a74..ad3a050dde9 100644 --- a/src/test/run-pass/issue-1257.rs +++ b/src/test/run-pass/issue-1257.rs @@ -10,7 +10,7 @@ pub fn main () { let mut line = "".to_string(); - let mut i = 0; + let mut i = 0i; while line != "exit".to_string() { line = if i == 9 { "exit".to_string() } else { "notexit".to_string() }; i += 1; diff --git a/src/test/run-pass/issue-13027.rs b/src/test/run-pass/issue-13027.rs index 8acaa889a04..e1634e44847 100644 --- a/src/test/run-pass/issue-13027.rs +++ b/src/test/run-pass/issue-13027.rs @@ -27,80 +27,80 @@ pub fn main() { } fn lit_shadow_range() { - assert_eq!(2i, match 1 { - 1 if false => 1, + assert_eq!(2i, match 1i { + 1 if false => 1i, 1..2 => 2, _ => 3 }); let x = 0i; assert_eq!(2i, match x+1 { - 0 => 0, + 0 => 0i, 1 if false => 1, 1..2 => 2, _ => 3 }); assert_eq!(2i, match val() { - 1 if false => 1, + 1 if false => 1i, 1..2 => 2, _ => 3 }); assert_eq!(2i, match CONST { - 0 => 0, + 0 => 0i, 1 if false => 1, 1..2 => 2, _ => 3 }); // value is out of the range of second arm, should match wildcard pattern - assert_eq!(3i, match 3 { - 1 if false => 1, + assert_eq!(3i, match 3i { + 1 if false => 1i, 1..2 => 2, _ => 3 }); } fn range_shadow_lit() { - assert_eq!(2i, match 1 { - 1..2 if false => 1, + assert_eq!(2i, match 1i { + 1..2 if false => 1i, 1 => 2, _ => 3 }); let x = 0i; assert_eq!(2i, match x+1 { - 0 => 0, + 0 => 0i, 1..2 if false => 1, 1 => 2, _ => 3 }); assert_eq!(2i, match val() { - 1..2 if false => 1, + 1..2 if false => 1i, 1 => 2, _ => 3 }); assert_eq!(2i, match CONST { - 0 => 0, + 0 => 0i, 1..2 if false => 1, 1 => 2, _ => 3 }); // ditto - assert_eq!(3i, match 3 { - 1..2 if false => 1, + assert_eq!(3i, match 3i { + 1..2 if false => 1i, 1 => 2, _ => 3 }); } fn range_shadow_range() { - assert_eq!(2i, match 1 { - 0..2 if false => 1, + assert_eq!(2i, match 1i { + 0..2 if false => 1i, 1..3 => 2, _ => 3, }); @@ -127,16 +127,16 @@ fn range_shadow_range() { }); // ditto - assert_eq!(3i, match 5 { - 0..2 if false => 1, + assert_eq!(3i, match 5i { + 0..2 if false => 1i, 1..3 => 2, _ => 3, }); } fn multi_pats_shadow_lit() { - assert_eq!(2i, match 1 { - 100 => 0, + assert_eq!(2i, match 1i { + 100 => 0i, 0 | 1..10 if false => 1, 1 => 2, _ => 3, @@ -144,8 +144,8 @@ fn multi_pats_shadow_lit() { } fn multi_pats_shadow_range() { - assert_eq!(2i, match 1 { - 100 => 0, + assert_eq!(2i, match 1i { + 100 => 0i, 0 | 1..10 if false => 1, 1..3 => 2, _ => 3, @@ -153,8 +153,8 @@ fn multi_pats_shadow_range() { } fn lit_shadow_multi_pats() { - assert_eq!(2i, match 1 { - 100 => 0, + assert_eq!(2i, match 1i { + 100 => 0i, 1 if false => 1, 0 | 1..10 => 2, _ => 3, @@ -162,8 +162,8 @@ fn lit_shadow_multi_pats() { } fn range_shadow_multi_pats() { - assert_eq!(2i, match 1 { - 100 => 0, + assert_eq!(2i, match 1i { + 100 => 0i, 1..3 if false => 1, 0 | 1..10 => 2, _ => 3, @@ -182,5 +182,5 @@ fn misc() { [Bar(_, pred)] if !pred => 2i, _ => 0i, }; - assert_eq!(2, r); + assert_eq!(2i, r); } diff --git a/src/test/run-pass/issue-13494.rs b/src/test/run-pass/issue-13494.rs index 528e6d43cef..d8f8b979ad0 100644 --- a/src/test/run-pass/issue-13494.rs +++ b/src/test/run-pass/issue-13494.rs @@ -29,9 +29,9 @@ fn helper(rx: Receiver<Sender<()>>) { fn test() { let (tx, rx) = channel(); spawn(proc() { helper(rx) }); - let (snd, rcv) = channel(); + let (snd, rcv) = channel::<int>(); for _ in range(1i, 100000i) { - snd.send(1); + snd.send(1i); let (tx2, rx2) = channel(); tx.send(tx2); select! { diff --git a/src/test/run-pass/issue-1460.rs b/src/test/run-pass/issue-1460.rs index 44465fe5f80..8176262abd9 100644 --- a/src/test/run-pass/issue-1460.rs +++ b/src/test/run-pass/issue-1460.rs @@ -10,5 +10,5 @@ pub fn main() { - {|i| if 1 == i { }}; + {|i| if 1i == i { }}; } diff --git a/src/test/run-pass/issue-15221.rs b/src/test/run-pass/issue-15221.rs index e5cfccac13a..378fd4a222e 100644 --- a/src/test/run-pass/issue-15221.rs +++ b/src/test/run-pass/issue-15221.rs @@ -17,7 +17,7 @@ macro_rules! outer ( ($e:pat ) => (inner!($e))) fn main() { - let outer!(g1) = 13; + let outer!(g1) = 13i; g1; } diff --git a/src/test/run-pass/issue-2216.rs b/src/test/run-pass/issue-2216.rs index 7276b11b181..d9d4120d4f4 100644 --- a/src/test/run-pass/issue-2216.rs +++ b/src/test/run-pass/issue-2216.rs @@ -16,7 +16,7 @@ pub fn main() { 'foo: loop { 'bar: loop { 'quux: loop { - if 1 == 2 { + if 1i == 2 { break 'foo; } else { diff --git a/src/test/run-pass/issue-2383.rs b/src/test/run-pass/issue-2383.rs index 5cdda4e5548..41cf3eaf7e3 100644 --- a/src/test/run-pass/issue-2383.rs +++ b/src/test/run-pass/issue-2383.rs @@ -15,5 +15,5 @@ use std::collections::Deque; pub fn main() { let mut q = RingBuf::new(); - q.push_back(10); + q.push_back(10i); } diff --git a/src/test/run-pass/issue-2428.rs b/src/test/run-pass/issue-2428.rs index 4e73be8d84e..8c8b9d5df13 100644 --- a/src/test/run-pass/issue-2428.rs +++ b/src/test/run-pass/issue-2428.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - let _foo = 100; + let _foo = 100i; static quux: int = 5; enum Stuff { diff --git a/src/test/run-pass/issue-2734.rs b/src/test/run-pass/issue-2734.rs index e331173a158..11ebf014bc6 100644 --- a/src/test/run-pass/issue-2734.rs +++ b/src/test/run-pass/issue-2734.rs @@ -21,5 +21,5 @@ fn deadcode() { } pub fn main() { - let _ = perform_hax(box 42); + let _ = perform_hax(box 42i); } diff --git a/src/test/run-pass/issue-2735.rs b/src/test/run-pass/issue-2735.rs index 622b35b93ae..1a5b175cffc 100644 --- a/src/test/run-pass/issue-2735.rs +++ b/src/test/run-pass/issue-2735.rs @@ -21,5 +21,5 @@ fn deadcode() { } pub fn main() { - perform_hax(box 42); + perform_hax(box 42i); } diff --git a/src/test/run-pass/issue-333.rs b/src/test/run-pass/issue-333.rs index 1217f32826f..ef49d0a170f 100644 --- a/src/test/run-pass/issue-333.rs +++ b/src/test/run-pass/issue-333.rs @@ -12,4 +12,4 @@ fn quux<T>(x: T) -> T { let f = id::<T>; return f(x); } fn id<T>(x: T) -> T { return x; } -pub fn main() { assert!((quux(10) == 10)); } +pub fn main() { assert!((quux(10i) == 10i)); } diff --git a/src/test/run-pass/issue-3500.rs b/src/test/run-pass/issue-3500.rs index 99def5476f9..eb422c9a8b9 100644 --- a/src/test/run-pass/issue-3500.rs +++ b/src/test/run-pass/issue-3500.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - let x = &Some(1); + let x = &Some(1i); match x { &Some(_) => (), &None => (), diff --git a/src/test/run-pass/issue-3878.rs b/src/test/run-pass/issue-3878.rs index 1b09889c887..063b2d70301 100644 --- a/src/test/run-pass/issue-3878.rs +++ b/src/test/run-pass/issue-3878.rs @@ -11,6 +11,6 @@ #![allow(path_statement)] pub fn main() { - let y = box 1; + let y = box 1i; y; } diff --git a/src/test/run-pass/issue-4387.rs b/src/test/run-pass/issue-4387.rs index f2973256199..447bf3b4b26 100644 --- a/src/test/run-pass/issue-4387.rs +++ b/src/test/run-pass/issue-4387.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn main() { - let _foo = [0, ..2*4]; + let _foo = [0i, ..2*4]; } diff --git a/src/test/run-pass/issue-6117.rs b/src/test/run-pass/issue-6117.rs index 80727b569de..e1ecf47e926 100644 --- a/src/test/run-pass/issue-6117.rs +++ b/src/test/run-pass/issue-6117.rs @@ -15,7 +15,7 @@ use std::gc::GC; enum Either<T, U> { Left(T), Right(U) } pub fn main() { - match Left(box(GC) 17) { + match Left(box(GC) 17i) { Right(()) => {} _ => {} } diff --git a/src/test/run-pass/issue-6318.rs b/src/test/run-pass/issue-6318.rs index 4eb005f3397..6512db3b1c5 100644 --- a/src/test/run-pass/issue-6318.rs +++ b/src/test/run-pass/issue-6318.rs @@ -21,7 +21,7 @@ impl Foo for Struct {} pub fn main() { match A(box Struct as Box<Foo>) { - A(_a) => 0, + A(_a) => 0i, }; } diff --git a/src/test/run-pass/issue-8044.rs b/src/test/run-pass/issue-8044.rs index 06f41e9cb7a..e5949e23467 100644 --- a/src/test/run-pass/issue-8044.rs +++ b/src/test/run-pass/issue-8044.rs @@ -14,5 +14,5 @@ extern crate minimal = "issue-8044"; use minimal::{BTree, leaf}; pub fn main() { - BTree::<int> { node: leaf(1) }; + BTree::<int> { node: leaf(1i) }; } diff --git a/src/test/run-pass/issue-8498.rs b/src/test/run-pass/issue-8498.rs index 770de8f5346..e4f4db6ea63 100644 --- a/src/test/run-pass/issue-8498.rs +++ b/src/test/run-pass/issue-8498.rs @@ -9,14 +9,14 @@ // except according to those terms. pub fn main() { - match &[(box 5,box 7)] { + match &[(box 5i,box 7i)] { ps => { let (ref y, _) = ps[0]; assert!(**y == 5); } } - match Some(&[(box 5,)]) { + match Some(&[(box 5i,)]) { Some(ps) => { let (ref y,) = ps[0]; assert!(**y == 5); @@ -24,7 +24,7 @@ pub fn main() { None => () } - match Some(&[(box 5,box 7)]) { + match Some(&[(box 5i,box 7i)]) { Some(ps) => { let (ref y, ref z) = ps[0]; assert!(**y == 5); diff --git a/src/test/run-pass/issue-868.rs b/src/test/run-pass/issue-868.rs index 12dcc4ecd2c..99ab83ec620 100644 --- a/src/test/run-pass/issue-868.rs +++ b/src/test/run-pass/issue-868.rs @@ -11,7 +11,7 @@ fn f<T>(g: || -> T) -> T { g() } pub fn main() { - let _x = f( | | { 10 }); + let _x = f( | | { 10i }); // used to be: cannot determine a type for this expression f(| | { }); // ditto diff --git a/src/test/run-pass/issue-8898.rs b/src/test/run-pass/issue-8898.rs index 84e9de9b924..e787962bb81 100644 --- a/src/test/run-pass/issue-8898.rs +++ b/src/test/run-pass/issue-8898.rs @@ -19,7 +19,7 @@ fn assert_repr_eq<T>(obj : T, expected : String) { } pub fn main() { - let abc = [1, 2, 3]; + let abc = [1i, 2, 3]; let tf = [true, false]; let x = [(), ()]; let slice = x.slice(0,1); diff --git a/src/test/run-pass/issue-8983.rs b/src/test/run-pass/issue-8983.rs index 9f6b281810e..2fb96f593ef 100644 --- a/src/test/run-pass/issue-8983.rs +++ b/src/test/run-pass/issue-8983.rs @@ -16,6 +16,6 @@ fn main() { fn f(_: proc()) {} fn eat<T>(_: T) {} - let x = box(GC) 1; + let x = box(GC) 1i; f(proc() { eat(x) }); } diff --git a/src/test/run-pass/issue-9906.rs b/src/test/run-pass/issue-9906.rs index 6b8e250ea74..dd12ea8b765 100644 --- a/src/test/run-pass/issue-9906.rs +++ b/src/test/run-pass/issue-9906.rs @@ -14,5 +14,5 @@ extern crate testmod = "issue-9906"; pub fn main() { testmod::foo(); - testmod::FooBar::new(1); + testmod::FooBar::new(1i); } diff --git a/src/test/run-pass/issue-9942.rs b/src/test/run-pass/issue-9942.rs index 7864f4fbdd6..aa86f488906 100644 --- a/src/test/run-pass/issue-9942.rs +++ b/src/test/run-pass/issue-9942.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn main() { - static S: uint = 23 as uint; [0, ..S]; () + static S: uint = 23 as uint; [0i, ..S]; () } diff --git a/src/test/run-pass/keyword-changes-2012-07-31.rs b/src/test/run-pass/keyword-changes-2012-07-31.rs index ff568b77f08..885f266ca3d 100644 --- a/src/test/run-pass/keyword-changes-2012-07-31.rs +++ b/src/test/run-pass/keyword-changes-2012-07-31.rs @@ -19,7 +19,7 @@ mod foo { } fn bar() -> int { - match 0 { - _ => { 0 } + match 0i { + _ => { 0i } } } diff --git a/src/test/run-pass/lazy-and-or.rs b/src/test/run-pass/lazy-and-or.rs index c4f37ccf88a..366b3c41328 100644 --- a/src/test/run-pass/lazy-and-or.rs +++ b/src/test/run-pass/lazy-and-or.rs @@ -13,7 +13,7 @@ extern crate debug; fn incr(x: &mut int) -> bool { *x += 1; assert!((false)); return false; } pub fn main() { - let x = 1 == 2 || 3 == 3; + let x = 1i == 2 || 3i == 3; assert!((x)); let mut y: int = 10; println!("{:?}", x || incr(&mut y)); diff --git a/src/test/run-pass/lazy-init.rs b/src/test/run-pass/lazy-init.rs index 60f7689ecfa..cd8be550d51 100644 --- a/src/test/run-pass/lazy-init.rs +++ b/src/test/run-pass/lazy-init.rs @@ -12,4 +12,4 @@ fn foo(x: int) { println!("{}", x); } -pub fn main() { let mut x: int; if 1 > 2 { x = 12; } else { x = 10; } foo(x); } +pub fn main() { let mut x: int; if 1i > 2 { x = 12; } else { x = 10; } foo(x); } diff --git a/src/test/run-pass/long-while.rs b/src/test/run-pass/long-while.rs index cbe26844708..7d30b22867c 100644 --- a/src/test/run-pass/long-while.rs +++ b/src/test/run-pass/long-while.rs @@ -14,6 +14,6 @@ pub fn main() { let mut i: int = 0; while i < 1000000 { i += 1; - let x = 3; + let x = 3i; } } diff --git a/src/test/run-pass/loop-diverges.rs b/src/test/run-pass/loop-diverges.rs index 9c46ba2cb9b..4fe73188b45 100644 --- a/src/test/run-pass/loop-diverges.rs +++ b/src/test/run-pass/loop-diverges.rs @@ -16,5 +16,5 @@ fn forever() -> ! { } pub fn main() { - if (1 == 2) { forever(); } + if (1i == 2) { forever(); } } diff --git a/src/test/run-pass/loop-label-shadowing.rs b/src/test/run-pass/loop-label-shadowing.rs index cfe51fe7758..46d4fa460fe 100644 --- a/src/test/run-pass/loop-label-shadowing.rs +++ b/src/test/run-pass/loop-label-shadowing.rs @@ -12,7 +12,7 @@ fn main() { let mut foo = Vec::new(); - 'foo: for i in [1, 2, 3].iter() { + 'foo: for i in [1i, 2, 3].iter() { foo.push(i); } } diff --git a/src/test/run-pass/loop-no-reinit-needed-post-bot.rs b/src/test/run-pass/loop-no-reinit-needed-post-bot.rs index 8b775002250..14aee4c3be8 100644 --- a/src/test/run-pass/loop-no-reinit-needed-post-bot.rs +++ b/src/test/run-pass/loop-no-reinit-needed-post-bot.rs @@ -17,7 +17,7 @@ fn my_fail() -> ! { loop {} } pub fn step(f: bool) { let mut g = S; - let mut i = 0; + let mut i = 0i; loop { if i > 10 { break; } else { i += 1; } diff --git a/src/test/run-pass/match-bot-2.rs b/src/test/run-pass/match-bot-2.rs index ba897bd92c0..f3c299bd1f9 100644 --- a/src/test/run-pass/match-bot-2.rs +++ b/src/test/run-pass/match-bot-2.rs @@ -9,5 +9,5 @@ // except according to those terms. // n.b. This was only ever failing with optimization disabled. -fn a() -> int { match return 1 { 2 => 3, _ => fail!() } } +fn a() -> int { match return 1i { 2i => 3i, _ => fail!() } } pub fn main() { a(); } diff --git a/src/test/run-pass/match-naked-record-expr.rs b/src/test/run-pass/match-naked-record-expr.rs index 433cf23626b..170a3513a1a 100644 --- a/src/test/run-pass/match-naked-record-expr.rs +++ b/src/test/run-pass/match-naked-record-expr.rs @@ -11,7 +11,7 @@ struct X { x: int } pub fn main() { - let _x = match 0 { + let _x = match 0i { _ => X { x: 0 }.x diff --git a/src/test/run-pass/match-naked-record.rs b/src/test/run-pass/match-naked-record.rs index fe12b7c1585..21c31b62183 100644 --- a/src/test/run-pass/match-naked-record.rs +++ b/src/test/run-pass/match-naked-record.rs @@ -11,7 +11,7 @@ struct X { x: int } pub fn main() { - let _x = match 0 { + let _x = match 0i { _ => X { x: 0 } diff --git a/src/test/run-pass/match-pipe-binding.rs b/src/test/run-pass/match-pipe-binding.rs index 52d966a12d7..2169e996577 100644 --- a/src/test/run-pass/match-pipe-binding.rs +++ b/src/test/run-pass/match-pipe-binding.rs @@ -10,7 +10,7 @@ fn test1() { // from issue 6338 - match ((1, "a".to_string()), (2, "b".to_string())) { + match ((1i, "a".to_string()), (2i, "b".to_string())) { ((1, a), (2, b)) | ((2, b), (1, a)) => { assert_eq!(a, "a".to_string()); assert_eq!(b, "b".to_string()); diff --git a/src/test/run-pass/match-range.rs b/src/test/run-pass/match-range.rs index 6b02b21a084..7421ae95884 100644 --- a/src/test/run-pass/match-range.rs +++ b/src/test/run-pass/match-range.rs @@ -26,15 +26,15 @@ pub fn main() { 'a'..'z' => {} _ => fail!("should suppport char ranges") } - match -3 { + match -3i { -7..5 => {} _ => fail!("should match signed range") } - match 3.0 { + match 3.0f64 { 1.0..5.0 => {} _ => fail!("should match float range") } - match -1.5 { + match -1.5f64 { -3.6..3.6 => {} _ => fail!("should match negative float range") } diff --git a/src/test/run-pass/multi-let.rs b/src/test/run-pass/multi-let.rs index eb1444be378..201abeba073 100644 --- a/src/test/run-pass/multi-let.rs +++ b/src/test/run-pass/multi-let.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - let x = 10; + let x = 10i; let y = x; assert!((y == 10)); } diff --git a/src/test/run-pass/negative.rs b/src/test/run-pass/negative.rs index d92496c4b7b..148c1c9f0cf 100644 --- a/src/test/run-pass/negative.rs +++ b/src/test/run-pass/negative.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - match -5 { + match -5i { -5 => {} _ => { fail!() } } diff --git a/src/test/run-pass/new-box-syntax.rs b/src/test/run-pass/new-box-syntax.rs index 0150120e1db..b16bef3fc99 100644 --- a/src/test/run-pass/new-box-syntax.rs +++ b/src/test/run-pass/new-box-syntax.rs @@ -22,15 +22,15 @@ struct Structure { } pub fn main() { - let x: Box<int> = box(HEAP) 2; - let y: Box<int> = box 2; - let z: Gc<int> = box(GC) 2; + let x: Box<int> = box(HEAP) 2i; + let y: Box<int> = box 2i; + let z: Gc<int> = box(GC) 2i; let a: Gc<Structure> = box(GC) Structure { x: 10, y: 20, }; - let b: Box<int> = box()(1 + 2); - let c = box()(3 + 4); - let d = box(GC)(5 + 6); + let b: Box<int> = box()(1i + 2); + let c = box()(3i + 4); + let d = box(GC)(5i + 6); } diff --git a/src/test/run-pass/operator-associativity.rs b/src/test/run-pass/operator-associativity.rs index bee6d23a27d..8d45b8ecb08 100644 --- a/src/test/run-pass/operator-associativity.rs +++ b/src/test/run-pass/operator-associativity.rs @@ -12,4 +12,4 @@ // Testcase for issue #130, operator associativity. -pub fn main() { assert!((3 * 5 / 2 == 7)); } +pub fn main() { assert!((3i * 5i / 2i == 7i)); } diff --git a/src/test/run-pass/out-of-stack.rs b/src/test/run-pass/out-of-stack.rs index 1566b9ed6f1..19d1635a9a5 100644 --- a/src/test/run-pass/out-of-stack.rs +++ b/src/test/run-pass/out-of-stack.rs @@ -21,7 +21,7 @@ use std::str; pub fn black_box<T>(dummy: T) { unsafe { asm!("" : : "r"(&dummy)) } } fn silent_recurse() { - let buf = [0, ..1000]; + let buf = [0i, ..1000]; black_box(buf); silent_recurse(); } diff --git a/src/test/run-pass/owned-implies-static.rs b/src/test/run-pass/owned-implies-static.rs index d1e9fb270d7..498b81d307e 100644 --- a/src/test/run-pass/owned-implies-static.rs +++ b/src/test/run-pass/owned-implies-static.rs @@ -11,5 +11,5 @@ fn f<T: 'static>(_x: T) {} pub fn main() { - f(box 5); + f(box 5i); } diff --git a/src/test/run-pass/paren-free.rs b/src/test/run-pass/paren-free.rs index d9669812d2a..569023c4439 100644 --- a/src/test/run-pass/paren-free.rs +++ b/src/test/run-pass/paren-free.rs @@ -10,6 +10,6 @@ pub fn main() { let x = true; - if x { let mut i = 10; while i > 0 { i -= 1; } } + if x { let mut i = 10i; while i > 0 { i -= 1; } } match x { true => { println!("right"); } false => { println!("wrong"); } } } diff --git a/src/test/run-pass/pub-extern-privacy.rs b/src/test/run-pass/pub-extern-privacy.rs index d48f9dccaaf..16f5a06b886 100644 --- a/src/test/run-pass/pub-extern-privacy.rs +++ b/src/test/run-pass/pub-extern-privacy.rs @@ -18,6 +18,6 @@ mod a { pub fn main() { unsafe { - a::free(transmute(0)); + a::free(transmute(0u)); } } diff --git a/src/test/run-pass/regions-infer-borrow-scope-view.rs b/src/test/run-pass/regions-infer-borrow-scope-view.rs index 1342c2e77f2..13200d619d0 100644 --- a/src/test/run-pass/regions-infer-borrow-scope-view.rs +++ b/src/test/run-pass/regions-infer-borrow-scope-view.rs @@ -12,7 +12,7 @@ fn view<'r, T>(x: &'r [T]) -> &'r [T] {x} pub fn main() { - let v = vec!(1, 2, 3); + let v = vec!(1i, 2, 3); let x = view(v.as_slice()); let y = view(x.as_slice()); assert!((*v.get(0) == x[0]) && (*v.get(0) == y[0])); diff --git a/src/test/run-pass/resource-assign-is-not-copy.rs b/src/test/run-pass/resource-assign-is-not-copy.rs index dc6dac15bb2..9dc3b7a0f80 100644 --- a/src/test/run-pass/resource-assign-is-not-copy.rs +++ b/src/test/run-pass/resource-assign-is-not-copy.rs @@ -33,11 +33,11 @@ fn r(i: Gc<Cell<int>>) -> r { } pub fn main() { - let i = box(GC) Cell::new(0); + let i = box(GC) Cell::new(0i); // Even though these look like copies, they are guaranteed not to be { let a = r(i); - let b = (a, 10); + let b = (a, 10i); let (c, _d) = b; println!("{:?}", c); } diff --git a/src/test/run-pass/self-re-assign.rs b/src/test/run-pass/self-re-assign.rs index e613a83737e..75fb98f8e24 100644 --- a/src/test/run-pass/self-re-assign.rs +++ b/src/test/run-pass/self-re-assign.rs @@ -14,11 +14,11 @@ use std::rc::Rc; pub fn main() { - let mut x = box 3; + let mut x = box 3i; x = x; assert!(*x == 3); - let mut x = Rc::new(3); + let mut x = Rc::new(3i); x = x; assert!(*x == 3); } diff --git a/src/test/run-pass/shadow.rs b/src/test/run-pass/shadow.rs index a65e44166e9..96a12494b2f 100644 --- a/src/test/run-pass/shadow.rs +++ b/src/test/run-pass/shadow.rs @@ -19,7 +19,7 @@ fn foo(c: Vec<int> ) { some::<int>(_) => { for _i in c.iter() { println!("{:?}", a); - let a = 17; + let a = 17i; b.push(a); } } @@ -29,4 +29,4 @@ fn foo(c: Vec<int> ) { enum t<T> { none, some(T), } -pub fn main() { let x = 10; let x = x + 20; assert!((x == 30)); foo(Vec::new()); } +pub fn main() { let x = 10i; let x = x + 20; assert!((x == 30)); foo(Vec::new()); } diff --git a/src/test/run-pass/static-assert.rs b/src/test/run-pass/static-assert.rs index f8fd81b9365..c695fa2b72e 100644 --- a/src/test/run-pass/static-assert.rs +++ b/src/test/run-pass/static-assert.rs @@ -12,13 +12,13 @@ static b: bool = true; #[static_assert] -static c: bool = 1 == 1; +static c: bool = 1i == 1; #[static_assert] -static d: bool = 1 != 2; +static d: bool = 1i != 2; #[static_assert] -static f: bool = (4/2) == 2; +static f: bool = (4i/2) == 2; pub fn main() { } diff --git a/src/test/run-pass/string-self-append.rs b/src/test/run-pass/string-self-append.rs index 612483f6909..dc1e23ca09c 100644 --- a/src/test/run-pass/string-self-append.rs +++ b/src/test/run-pass/string-self-append.rs @@ -11,7 +11,7 @@ pub fn main() { // Make sure we properly handle repeated self-appends. let mut a: String = "A".to_string(); - let mut i = 20; + let mut i = 20i; let mut expected_len = 1u; while i > 0 { println!("{}", a.len()); diff --git a/src/test/run-pass/supported-cast.rs b/src/test/run-pass/supported-cast.rs index a3ab4637412..2757439828d 100644 --- a/src/test/run-pass/supported-cast.rs +++ b/src/test/run-pass/supported-cast.rs @@ -11,7 +11,7 @@ extern crate libc; pub fn main() { - let f = 1 as *const libc::FILE; + let f = 1u as *const libc::FILE; println!("{}", f as int); println!("{}", f as uint); println!("{}", f as i8); @@ -34,8 +34,8 @@ pub fn main() { println!("{}", 1 as u16); println!("{}", 1 as u32); println!("{}", 1 as u64); - println!("{}", 1 as f32); - println!("{}", 1 as f64); + println!("{}", 1i as f32); + println!("{}", 1i as f64); println!("{}", 1u as int); println!("{}", 1u as uint); @@ -191,19 +191,6 @@ pub fn main() { println!("{}", true as f32); println!("{}", true as f64); - println!("{}", 1. as int); - println!("{}", 1. as uint); - println!("{}", 1. as i8); - println!("{}", 1. as i16); - println!("{}", 1. as i32); - println!("{}", 1. as i64); - println!("{}", 1. as u8); - println!("{}", 1. as u16); - println!("{}", 1. as u32); - println!("{}", 1. as u64); - println!("{}", 1. as f32); - println!("{}", 1. as f64); - println!("{}", 1f32 as int); println!("{}", 1f32 as uint); println!("{}", 1f32 as i8); diff --git a/src/test/run-pass/swap-1.rs b/src/test/run-pass/swap-1.rs index 82a76512e08..9a77356d7eb 100644 --- a/src/test/run-pass/swap-1.rs +++ b/src/test/run-pass/swap-1.rs @@ -11,7 +11,7 @@ use std::mem::swap; pub fn main() { - let mut x = 3; let mut y = 7; + let mut x = 3i; let mut y = 7i; swap(&mut x, &mut y); assert!((x == 7)); assert!((y == 3)); } diff --git a/src/test/run-pass/tag-variant-disr-type-mismatch.rs b/src/test/run-pass/tag-variant-disr-type-mismatch.rs index 3d63acd5b83..c04751d51b4 100644 --- a/src/test/run-pass/tag-variant-disr-type-mismatch.rs +++ b/src/test/run-pass/tag-variant-disr-type-mismatch.rs @@ -9,7 +9,7 @@ // except according to those terms. enum color { - red = 1u, + red = 1i, blue = 2, } diff --git a/src/test/run-pass/task-comm-12.rs b/src/test/run-pass/task-comm-12.rs index 851f87adfc2..f72c0ef8d7b 100644 --- a/src/test/run-pass/task-comm-12.rs +++ b/src/test/run-pass/task-comm-12.rs @@ -21,7 +21,7 @@ fn test00() { }); // Sleep long enough for the task to finish. - let mut i = 0; + let mut i = 0u; while i < 10000 { task::deschedule(); i += 1; diff --git a/src/test/run-pass/terminate-in-initializer.rs b/src/test/run-pass/terminate-in-initializer.rs index 391f0e20fcc..eb0bfc969f3 100644 --- a/src/test/run-pass/terminate-in-initializer.rs +++ b/src/test/run-pass/terminate-in-initializer.rs @@ -18,7 +18,7 @@ use std::gc::{Gc}; fn test_break() { loop { let _x: Gc<int> = break; } } -fn test_cont() { let mut i = 0; while i < 1 { i += 1; let _x: Gc<int> = continue; } } +fn test_cont() { let mut i = 0i; while i < 1 { i += 1; let _x: Gc<int> = continue; } } fn test_ret() { let _x: Gc<int> = return; } diff --git a/src/test/run-pass/trailing-comma.rs b/src/test/run-pass/trailing-comma.rs index 13d79959f81..8d580729da9 100644 --- a/src/test/run-pass/trailing-comma.rs +++ b/src/test/run-pass/trailing-comma.rs @@ -11,6 +11,6 @@ fn f(_: int,) {} pub fn main() { - f(0,); - let (_, _,) = (1, 1,); + f(0i,); + let (_, _,) = (1i, 1i,); } diff --git a/src/test/run-pass/trait-default-method-xc-2.rs b/src/test/run-pass/trait-default-method-xc-2.rs index 9e4a7c4be97..447968eb8c4 100644 --- a/src/test/run-pass/trait-default-method-xc-2.rs +++ b/src/test/run-pass/trait-default-method-xc-2.rs @@ -20,8 +20,8 @@ use aux2::{a_struct, welp}; pub fn main () { - let a = a_struct { x: 0 }; - let b = a_struct { x: 1 }; + let a = a_struct { x: 0i }; + let b = a_struct { x: 1i }; assert_eq!(0i.g(), 10); assert_eq!(a.g(), 10); @@ -30,5 +30,5 @@ pub fn main () { assert_eq!(b.h(), 11); assert_eq!(A::lurr(&a, &b), 21); - welp(&0); + welp(&0i); } diff --git a/src/test/run-pass/type-param-constraints.rs b/src/test/run-pass/type-param-constraints.rs index b87517940c2..fd7e749935b 100644 --- a/src/test/run-pass/type-param-constraints.rs +++ b/src/test/run-pass/type-param-constraints.rs @@ -35,15 +35,15 @@ pub fn main() { p_foo(box(GC) r(10)); p_foo(box r(10)); - p_foo(box(GC) 10); - p_foo(box 10); - p_foo(10); + p_foo(box(GC) 10i); + p_foo(box 10i); + p_foo(10i); s_foo(box(GC) r(10)); - s_foo(box(GC) 10); - s_foo(box 10); - s_foo(10); + s_foo(box(GC) 10i); + s_foo(box 10i); + s_foo(10i); - u_foo(box 10); - u_foo(10); + u_foo(box 10i); + u_foo(10i); } diff --git a/src/test/run-pass/typestate-cfg-nesting.rs b/src/test/run-pass/typestate-cfg-nesting.rs index 37d06bf4f83..f1e40cc3e58 100644 --- a/src/test/run-pass/typestate-cfg-nesting.rs +++ b/src/test/run-pass/typestate-cfg-nesting.rs @@ -12,12 +12,12 @@ #![allow(unused_variable)] fn f() { - let x = 10; let mut y = 11; + let x = 10i; let mut y = 11i; if true { match x { _ => { y = x; } } } else { } } pub fn main() { - let x = 10; - let mut y = 11; + let x = 10i; + let mut y = 11i; if true { while false { y = x; } } else { } } diff --git a/src/test/run-pass/typestate-multi-decl.rs b/src/test/run-pass/typestate-multi-decl.rs index 42910c47005..cbb0dcc8f2b 100644 --- a/src/test/run-pass/typestate-multi-decl.rs +++ b/src/test/run-pass/typestate-multi-decl.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - let (x, y) = (10, 20); + let (x, y) = (10i, 20i); let z = x + y; assert!((z == 30)); } diff --git a/src/test/run-pass/unify-return-ty.rs b/src/test/run-pass/unify-return-ty.rs index bf74dedebc4..a189d4528ae 100644 --- a/src/test/run-pass/unify-return-ty.rs +++ b/src/test/run-pass/unify-return-ty.rs @@ -16,7 +16,7 @@ use std::mem; fn null<T>() -> *const T { unsafe { - mem::transmute(0) + mem::transmute(0u) } } diff --git a/src/test/run-pass/unique-create.rs b/src/test/run-pass/unique-create.rs index 834b549d4f4..acd405e2659 100644 --- a/src/test/run-pass/unique-create.rs +++ b/src/test/run-pass/unique-create.rs @@ -9,9 +9,9 @@ // except according to those terms. pub fn main() { - box 100; + box 100i; } fn vec() { - vec!(0); + vec!(0i); } diff --git a/src/test/run-pass/unique-drop-complex.rs b/src/test/run-pass/unique-drop-complex.rs index 01aac804bb6..a4b6ff5accf 100644 --- a/src/test/run-pass/unique-drop-complex.rs +++ b/src/test/run-pass/unique-drop-complex.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn main() { - let _x = box vec!(0,0,0,0,0); + let _x = box vec!(0i,0,0,0,0); } diff --git a/src/test/run-pass/unique-init.rs b/src/test/run-pass/unique-init.rs index d7105b472cc..6e58ec23a3b 100644 --- a/src/test/run-pass/unique-init.rs +++ b/src/test/run-pass/unique-init.rs @@ -9,5 +9,5 @@ // except according to those terms. pub fn main() { - let _i = box 100; + let _i = box 100i; } diff --git a/src/test/run-pass/unreachable-code.rs b/src/test/run-pass/unreachable-code.rs index 2d74b3163d2..6b6754f3432 100644 --- a/src/test/run-pass/unreachable-code.rs +++ b/src/test/run-pass/unreachable-code.rs @@ -23,10 +23,10 @@ fn call_id_2() { id(true) && id(return); } fn call_id_3() { id(return) && id(return); } -fn ret_ret() -> int { return (return 2) + 3; } +fn ret_ret() -> int { return (return 2i) + 3i; } fn ret_guard() { - match 2 { + match 2i { x if (return) => { x; } _ => {} } diff --git a/src/test/run-pass/unused-move-capture.rs b/src/test/run-pass/unused-move-capture.rs index 83795e64467..ba48ae1c0ce 100644 --- a/src/test/run-pass/unused-move-capture.rs +++ b/src/test/run-pass/unused-move-capture.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - let _x = box 1; + let _x = box 1i; let lam_move: || = || {}; lam_move(); } diff --git a/src/test/run-pass/unused-move.rs b/src/test/run-pass/unused-move.rs index bac9ce814bc..883ec44bf2e 100644 --- a/src/test/run-pass/unused-move.rs +++ b/src/test/run-pass/unused-move.rs @@ -16,6 +16,6 @@ pub fn main() { - let y = box 1; + let y = box 1i; y; } diff --git a/src/test/run-pass/unwind-box.rs b/src/test/run-pass/unwind-box.rs index f06791ff2c7..a81f88e2af3 100644 --- a/src/test/run-pass/unwind-box.rs +++ b/src/test/run-pass/unwind-box.rs @@ -14,7 +14,7 @@ use std::task; use std::gc::GC; fn f() { - let _a = box(GC) 0; + let _a = box(GC) 0i; fail!(); } diff --git a/src/test/run-pass/unwind-unique.rs b/src/test/run-pass/unwind-unique.rs index ce252439618..e5497427755 100644 --- a/src/test/run-pass/unwind-unique.rs +++ b/src/test/run-pass/unwind-unique.rs @@ -11,7 +11,7 @@ use std::task; fn f() { - let _a = box 0; + let _a = box 0i; fail!(); } diff --git a/src/test/run-pass/vec-macro-with-brackets.rs b/src/test/run-pass/vec-macro-with-brackets.rs index 87b18f841ed..d06e3dc0633 100644 --- a/src/test/run-pass/vec-macro-with-brackets.rs +++ b/src/test/run-pass/vec-macro-with-brackets.rs @@ -19,5 +19,5 @@ macro_rules! vec [ ] pub fn main() { - let my_vec = vec![1, 2, 3, 4, 5]; + let my_vec = vec![1i, 2, 3, 4, 5]; } diff --git a/src/test/run-pass/vec-matching.rs b/src/test/run-pass/vec-matching.rs index ac869a10d2e..8ba8ba4482e 100644 --- a/src/test/run-pass/vec-matching.rs +++ b/src/test/run-pass/vec-matching.rs @@ -69,7 +69,7 @@ fn d() { } fn e() { - match &[1, 2, 3] { + match &[1i, 2, 3] { [1, 2] => (), [..] => () } diff --git a/src/test/run-pass/vec-push.rs b/src/test/run-pass/vec-push.rs index 33f01c5bd41..fe0f92a0c11 100644 --- a/src/test/run-pass/vec-push.rs +++ b/src/test/run-pass/vec-push.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -pub fn main() { let mut v = vec!(1, 2, 3); v.push(1); } +pub fn main() { let mut v = vec!(1i, 2, 3); v.push(1); } diff --git a/src/test/run-pass/vec-repeat-with-cast.rs b/src/test/run-pass/vec-repeat-with-cast.rs index f5d09e308ba..18ccd8c96ab 100644 --- a/src/test/run-pass/vec-repeat-with-cast.rs +++ b/src/test/run-pass/vec-repeat-with-cast.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -pub fn main() { let _a = [0, ..1 as uint]; } +pub fn main() { let _a = [0i, ..1 as uint]; } diff --git a/src/test/run-pass/weird-exprs.rs b/src/test/run-pass/weird-exprs.rs index 61578578ab6..bae1a7c45e4 100644 --- a/src/test/run-pass/weird-exprs.rs +++ b/src/test/run-pass/weird-exprs.rs @@ -38,7 +38,7 @@ fn zombiejesus() { while (return) { if (return) { match (return) { - 1 => { + 1i => { if (return) { return } else { @@ -56,7 +56,7 @@ fn zombiejesus() { } fn notsure() { - let mut _x; + let mut _x: int; let mut _y = (_x = 0) == (_x = 0); let mut _z = (_x = 0) < (_x = 0); let _a = (_x += 0) == (_x = 0); @@ -72,8 +72,8 @@ fn canttouchthis() -> uint { fn angrydome() { loop { if break { } } - let mut i = 0; - loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => fail!("wat") } } + let mut i = 0i; + loop { i += 1; if i == 1 { match (continue) { 1i => { }, _ => fail!("wat") } } break; } } diff --git a/src/test/run-pass/while-flow-graph.rs b/src/test/run-pass/while-flow-graph.rs index 36d902dc2e0..01c5986b130 100644 --- a/src/test/run-pass/while-flow-graph.rs +++ b/src/test/run-pass/while-flow-graph.rs @@ -10,4 +10,4 @@ -pub fn main() { let x: int = 10; while x == 10 && x == 11 { let _y = 0xf00; } } +pub fn main() { let x: int = 10; while x == 10 && x == 11 { let _y = 0xf00u; } } |
