diff --git a/src/doc/intro.md b/src/doc/intro.md index b92d38215c29b..1e343b593df2d 100644 --- a/src/doc/intro.md +++ b/src/doc/intro.md @@ -424,7 +424,7 @@ Let's see an example. This Rust code will not compile: use std::thread::Thread; fn main() { - let mut numbers = vec![1is, 2, 3]; + let mut numbers = vec![1, 2, 3]; for i in 0..3 { Thread::spawn(move || { @@ -478,7 +478,7 @@ use std::thread::Thread; use std::sync::{Arc,Mutex}; fn main() { - let numbers = Arc::new(Mutex::new(vec![1is, 2, 3])); + let numbers = Arc::new(Mutex::new(vec![1, 2, 3])); for i in 0us..3 { let number = numbers.clone(); @@ -539,7 +539,7 @@ safety check that makes this an error about moved values: use std::thread::Thread; fn main() { - let vec = vec![1is, 2, 3]; + let vec = vec![1, 2, 3]; for i in 0us..3 { Thread::spawn(move || { diff --git a/src/doc/reference.md b/src/doc/reference.md index 936c0aac79f16..778d98a6ae49d 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -268,7 +268,7 @@ cases mentioned in [Number literals](#number-literals) below. ##### Suffixes | Integer | Floating-point | |---------|----------------| -| `is` (`isize`), `us` (`usize`), `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64` | `f32`, `f64` | +| `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64`, `i64`, `is` (`isize`), `us` (`usize`) | `f32`, `f64` | #### Character and string literals @@ -468,27 +468,29 @@ Like any literal, an integer literal may be followed (immediately, without any spaces) by an _integer suffix_, which forcibly sets the type of the literal. There are 10 valid values for an integer suffix: -* The `is` and `us` suffixes give the literal type `isize` or `usize`, - respectively. * Each of the signed and unsigned machine types `u8`, `i8`, `u16`, `i16`, `u32`, `i32`, `u64` and `i64` give the literal the corresponding machine type. +* The `is` and `us` suffixes give the literal type `isize` or `usize`, + respectively. The type of an _unsuffixed_ integer literal is determined by type inference. If an integer type can be _uniquely_ determined from the surrounding program context, the unsuffixed integer literal has that type. If the program context -underconstrains the type, it is considered a static type error; if the program -context overconstrains the type, it is also considered a static type error. +underconstrains the type, it defaults to the signed 32-bit integer `i32`; if +the program context overconstrains the type, it is considered a static type +error. Examples of integer literals of various forms: ``` -123is; // type isize -123us; // type usize -123_us; // type usize +123i32; // type i32 +123u32; // type u32 +123_u32; // type u32 0xff_u8; // type u8 0o70_i16; // type i16 0b1111_1111_1001_0000_i32; // type i32 +0us; // type usize ``` ##### Floating-point literals @@ -1135,8 +1137,8 @@ used as a type name. When a generic function is referenced, its type is instantiated based on the context of the reference. For example, calling the `iter` function defined -above on `[1, 2]` will instantiate type parameter `T` with `isize`, and require -the closure parameter to have type `fn(isize)`. +above on `[1, 2]` will instantiate type parameter `T` with `i32`, and require +the closure parameter to have type `fn(i32)`. The type parameters can also be explicitly supplied in a trailing [path](#paths) component after the function name. This might be necessary if @@ -2746,9 +2748,9 @@ constant expression that can be evaluated at compile time, such as a [literal](#literals) or a [static item](#static-items). ``` -[1is, 2, 3, 4]; +[1, 2, 3, 4]; ["a", "b", "c", "d"]; -[0is; 128]; // array with 128 zeros +[0; 128]; // array with 128 zeros [0u8, 0u8, 0u8, 0u8]; ``` @@ -2921,7 +2923,7 @@ moves](#moved-and-copied-types) its right-hand operand to its left-hand operand. ``` -# let mut x = 0is; +# let mut x = 0; # let y = 0; x = y; @@ -3307,11 +3309,11 @@ fn main() { ``` Patterns can also dereference pointers by using the `&`, `&mut` and `box` -symbols, as appropriate. For example, these two matches on `x: &isize` are +symbols, as appropriate. For example, these two matches on `x: &i32` are equivalent: ``` -# let x = &3is; +# let x = &3; let y = match *x { 0 => "zero", _ => "some" }; let z = match x { &0 => "zero", _ => "some" }; @@ -3332,7 +3334,7 @@ Multiple match patterns may be joined with the `|` operator. A range of values may be specified with `...`. For example: ``` -# let x = 2is; +# let x = 2; let message = match x { 0 | 1 => "not many", @@ -3673,16 +3675,16 @@ The type of a closure mapping an input of type `A` to an output of type `B` is An example of creating and calling a closure: ```rust -let captured_var = 10is; +let captured_var = 10; let closure_no_args = |&:| println!("captured_var={}", captured_var); -let closure_args = |&: arg: isize| -> isize { +let closure_args = |&: arg: i32| -> i32 { println!("captured_var={}, arg={}", captured_var, arg); arg // Note lack of semicolon after 'arg' }; -fn call_closure isize>(c1: F, c2: G) { +fn call_closure i32>(c1: F, c2: G) { c1(); c2(2); } @@ -3714,7 +3716,7 @@ trait Printable { fn stringify(&self) -> String; } -impl Printable for isize { +impl Printable for i32 { fn stringify(&self) -> String { self.to_string() } } @@ -3723,7 +3725,7 @@ fn print(a: Box) { } fn main() { - print(Box::new(10is) as Box); + print(Box::new(10) as Box); } ``` diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs index 911ed58b6eed4..beb2973febc6a 100644 --- a/src/libcollections/dlist.rs +++ b/src/libcollections/dlist.rs @@ -333,7 +333,7 @@ impl DList { /// /// let mut dl = DList::new(); /// - /// dl.push_front(2is); + /// dl.push_front(2); /// assert_eq!(dl.len(), 1); /// /// dl.push_front(1); @@ -360,10 +360,10 @@ impl DList { /// /// let mut dl = DList::new(); /// - /// dl.push_front(2is); + /// dl.push_front(2); /// dl.push_front(1); /// assert_eq!(dl.len(), 2); - /// assert_eq!(dl.front(), Some(&1is)); + /// assert_eq!(dl.front(), Some(&1)); /// /// dl.clear(); /// assert_eq!(dl.len(), 0); @@ -388,7 +388,7 @@ impl DList { /// assert_eq!(dl.front(), None); /// /// dl.push_front(1); - /// assert_eq!(dl.front(), Some(&1is)); + /// assert_eq!(dl.front(), Some(&1)); /// /// ``` #[inline] @@ -409,13 +409,13 @@ impl DList { /// assert_eq!(dl.front(), None); /// /// dl.push_front(1); - /// assert_eq!(dl.front(), Some(&1is)); + /// assert_eq!(dl.front(), Some(&1)); /// /// match dl.front_mut() { /// None => {}, - /// Some(x) => *x = 5is, + /// Some(x) => *x = 5, /// } - /// assert_eq!(dl.front(), Some(&5is)); + /// assert_eq!(dl.front(), Some(&5)); /// /// ``` #[inline] @@ -436,7 +436,7 @@ impl DList { /// assert_eq!(dl.back(), None); /// /// dl.push_back(1); - /// assert_eq!(dl.back(), Some(&1is)); + /// assert_eq!(dl.back(), Some(&1)); /// /// ``` #[inline] @@ -457,13 +457,13 @@ impl DList { /// assert_eq!(dl.back(), None); /// /// dl.push_back(1); - /// assert_eq!(dl.back(), Some(&1is)); + /// assert_eq!(dl.back(), Some(&1)); /// /// match dl.back_mut() { /// None => {}, - /// Some(x) => *x = 5is, + /// Some(x) => *x = 5, /// } - /// assert_eq!(dl.back(), Some(&5is)); + /// assert_eq!(dl.back(), Some(&5)); /// /// ``` #[inline] @@ -483,8 +483,8 @@ impl DList { /// /// let mut dl = DList::new(); /// - /// dl.push_front(2is); - /// assert_eq!(dl.front().unwrap(), &2is); + /// dl.push_front(2); + /// assert_eq!(dl.front().unwrap(), &2); /// /// dl.push_front(1); /// assert_eq!(dl.front().unwrap(), &1); @@ -508,7 +508,7 @@ impl DList { /// let mut d = DList::new(); /// assert_eq!(d.pop_front(), None); /// - /// d.push_front(1is); + /// d.push_front(1); /// d.push_front(3); /// assert_eq!(d.pop_front(), Some(3)); /// assert_eq!(d.pop_front(), Some(1)); @@ -568,7 +568,7 @@ impl DList { /// /// let mut d = DList::new(); /// - /// d.push_front(1is); + /// d.push_front(1); /// d.push_front(2); /// d.push_front(3); /// diff --git a/src/libcoretest/hash/mod.rs b/src/libcoretest/hash/mod.rs index ae23024cf20ae..07f3ab4a5a726 100644 --- a/src/libcoretest/hash/mod.rs +++ b/src/libcoretest/hash/mod.rs @@ -50,13 +50,13 @@ fn test_writer_hasher() { assert_eq!(hash(&5u16), 5); assert_eq!(hash(&5u32), 5); assert_eq!(hash(&5u64), 5); - assert_eq!(hash(&5u), 5); + assert_eq!(hash(&5us), 5); assert_eq!(hash(&5i8), 5); assert_eq!(hash(&5i16), 5); assert_eq!(hash(&5i32), 5); assert_eq!(hash(&5i64), 5); - assert_eq!(hash(&5), 5); + assert_eq!(hash(&5is), 5); assert_eq!(hash(&false), 0); assert_eq!(hash(&true), 1); @@ -76,12 +76,12 @@ fn test_writer_hasher() { // FIXME (#18248) Add tests for hashing Rc and Rc<[T]> unsafe { - let ptr: *const i32 = mem::transmute(5is); + let ptr: *const i32 = mem::transmute(5us); assert_eq!(hash(&ptr), 5); } unsafe { - let ptr: *mut i32 = mem::transmute(5is); + let ptr: *mut i32 = mem::transmute(5us); assert_eq!(hash(&ptr), 5); } } diff --git a/src/libcoretest/iter.rs b/src/libcoretest/iter.rs index 3102abb660fb8..c9cdf50fdbd08 100644 --- a/src/libcoretest/iter.rs +++ b/src/libcoretest/iter.rs @@ -375,7 +375,7 @@ fn test_iterator_size_hint() { assert_eq!(c.clone().enumerate().size_hint(), (uint::MAX, None)); assert_eq!(c.clone().chain(vi.clone().map(|&i| i)).size_hint(), (uint::MAX, None)); assert_eq!(c.clone().zip(vi.clone()).size_hint(), (10, Some(10))); - assert_eq!(c.clone().scan(0i, |_,_| Some(0)).size_hint(), (0, None)); + assert_eq!(c.clone().scan(0, |_,_| Some(0)).size_hint(), (0, None)); assert_eq!(c.clone().filter(|_| false).size_hint(), (0, None)); assert_eq!(c.clone().map(|_| 0).size_hint(), (uint::MAX, None)); assert_eq!(c.filter_map(|_| Some(0)).size_hint(), (0, None)); @@ -389,7 +389,7 @@ fn test_iterator_size_hint() { assert_eq!(vi.clone().enumerate().size_hint(), (10, Some(10))); assert_eq!(vi.clone().chain(v2.iter()).size_hint(), (13, Some(13))); assert_eq!(vi.clone().zip(v2.iter()).size_hint(), (3, Some(3))); - assert_eq!(vi.clone().scan(0i, |_,_| Some(0)).size_hint(), (0, Some(10))); + assert_eq!(vi.clone().scan(0, |_,_| Some(0)).size_hint(), (0, Some(10))); assert_eq!(vi.clone().filter(|_| false).size_hint(), (0, Some(10))); assert_eq!(vi.clone().map(|&i| i+1).size_hint(), (10, Some(10))); assert_eq!(vi.filter_map(|_| Some(0)).size_hint(), (0, Some(10))); diff --git a/src/libcoretest/option.rs b/src/libcoretest/option.rs index b32ae68b5d392..860bd40e21eee 100644 --- a/src/libcoretest/option.rs +++ b/src/libcoretest/option.rs @@ -223,7 +223,7 @@ fn test_ord() { /* FIXME(#20575) #[test] fn test_collect() { - let v: Option> = (0..0).map(|_| Some(0i)).collect(); + let v: Option> = (0..0).map(|_| Some(0)).collect(); assert!(v == Some(vec![])); let v: Option> = (0..3).map(|x| Some(x)).collect(); diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 3095c2c0e41ff..c6dcb0d230ff7 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -1198,7 +1198,7 @@ mod test_set { #[test] fn test_drain() { - let mut s: HashSet = (1is..100).collect(); + let mut s: HashSet = (1..100).collect(); // try this a bunch of times to make sure we don't screw up internal state. for _ in 0..20 { @@ -1217,7 +1217,7 @@ mod test_set { for _ in s.iter() { panic!("s should be empty!"); } // reset to try again. - s.extend(1is..100); + s.extend(1..100); } } } diff --git a/src/libstd/old_io/fs.rs b/src/libstd/old_io/fs.rs index 1337675544d31..0a9aeb849be4b 100644 --- a/src/libstd/old_io/fs.rs +++ b/src/libstd/old_io/fs.rs @@ -1101,7 +1101,7 @@ mod test { let dir = &tmpdir.join("di_readdir"); check!(mkdir(dir, old_io::USER_RWX)); let prefix = "foo"; - for n in 0is..3 { + for n in 0..3 { let f = dir.join(format!("{}.txt", n)); let mut w = check!(File::create(&f)); let msg_str = format!("{}{}", prefix, n); diff --git a/src/libstd/old_io/net/tcp.rs b/src/libstd/old_io/net/tcp.rs index 122ac4c3445cc..ebf7f6cc0f2a9 100644 --- a/src/libstd/old_io/net/tcp.rs +++ b/src/libstd/old_io/net/tcp.rs @@ -1160,7 +1160,7 @@ mod test { tx.send(TcpStream::connect(addr).unwrap()).unwrap(); }); let _l = rx.recv().unwrap(); - for i in 0is..1001 { + for i in 0i32..1001 { match a.accept() { Ok(..) => break, Err(ref e) if e.kind == TimedOut => {} @@ -1260,7 +1260,7 @@ mod test { assert_eq!(s.read(&mut [0]).err().unwrap().kind, TimedOut); s.set_timeout(Some(20)); - for i in 0is..1001 { + for i in 0i32..1001 { match s.write(&[0; 128 * 1024]) { Ok(()) | Err(IoError { kind: ShortWrite(..), .. }) => {}, Err(IoError { kind: TimedOut, .. }) => break, @@ -1318,7 +1318,7 @@ mod test { let mut s = a.accept().unwrap(); s.set_write_timeout(Some(20)); - for i in 0is..1001 { + for i in 0i32..1001 { match s.write(&[0; 128 * 1024]) { Ok(()) | Err(IoError { kind: ShortWrite(..), .. }) => {}, Err(IoError { kind: TimedOut, .. }) => break, diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index e7be876edbbec..8ac5b6e52747a 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -573,7 +573,7 @@ pub fn byte_lit(lit: &str) -> (u8, usize) { if lit.len() == 1 { (lit.as_bytes()[0], 1) } else { - assert!(lit.as_bytes()[0] == b'\\', err(0is)); + assert!(lit.as_bytes()[0] == b'\\', err(0)); let b = match lit.as_bytes()[1] { b'"' => b'"', b'n' => b'\n', diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs index 7fb2f9a80cc85..70d6a5f695a8d 100644 --- a/src/libsyntax/print/pp.rs +++ b/src/libsyntax/print/pp.rs @@ -167,7 +167,7 @@ pub fn mk_printer(out: Box, linewidth: usize) -> Printer let n: usize = 3 * linewidth; debug!("mk_printer {}", linewidth); let token: Vec = repeat(Token::Eof).take(n).collect(); - let size: Vec = repeat(0is).take(n).collect(); + let size: Vec = repeat(0).take(n).collect(); let scan_stack: Vec = repeat(0us).take(n).collect(); Printer { out: out, diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index 21a7d68084751..12f871b27829e 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -195,14 +195,14 @@ mod test { let v: SmallVector = SmallVector::zero(); assert_eq!(0, v.len()); - assert_eq!(1, SmallVector::one(1is).len()); - assert_eq!(5, SmallVector::many(vec!(1is, 2, 3, 4, 5)).len()); + assert_eq!(1, SmallVector::one(1).len()); + assert_eq!(5, SmallVector::many(vec![1, 2, 3, 4, 5]).len()); } #[test] fn test_push_get() { let mut v = SmallVector::zero(); - v.push(1is); + v.push(1); assert_eq!(1, v.len()); assert_eq!(&1, v.get(0)); v.push(2); @@ -215,7 +215,7 @@ mod test { #[test] fn test_from_iter() { - let v: SmallVector = (vec![1is, 2, 3]).into_iter().collect(); + let v: SmallVector = (vec![1, 2, 3]).into_iter().collect(); assert_eq!(3, v.len()); assert_eq!(&1, v.get(0)); assert_eq!(&2, v.get(1)); @@ -228,11 +228,11 @@ mod test { let v: Vec = v.into_iter().collect(); assert_eq!(Vec::new(), v); - let v = SmallVector::one(1is); - assert_eq!(vec!(1is), v.into_iter().collect::>()); + let v = SmallVector::one(1); + assert_eq!(vec![1], v.into_iter().collect::>()); - let v = SmallVector::many(vec!(1is, 2is, 3is)); - assert_eq!(vec!(1is, 2is, 3is), v.into_iter().collect::>()); + let v = SmallVector::many(vec![1, 2, 3]); + assert_eq!(vec!(1, 2, 3), v.into_iter().collect::>()); } #[test] @@ -244,12 +244,12 @@ mod test { #[test] #[should_fail] fn test_expect_one_many() { - SmallVector::many(vec!(1is, 2)).expect_one(""); + SmallVector::many(vec!(1, 2)).expect_one(""); } #[test] fn test_expect_one_one() { - assert_eq!(1is, SmallVector::one(1is).expect_one("")); - assert_eq!(1is, SmallVector::many(vec!(1is)).expect_one("")); + assert_eq!(1, SmallVector::one(1).expect_one("")); + assert_eq!(1, SmallVector::many(vec!(1)).expect_one("")); } } diff --git a/src/test/bench/shootout-meteor.rs b/src/test/bench/shootout-meteor.rs index 3c01697166e8b..d44948e4ed277 100644 --- a/src/test/bench/shootout-meteor.rs +++ b/src/test/bench/shootout-meteor.rs @@ -104,8 +104,8 @@ impl<'a, T> Iterator for ListIterator<'a, T> { // corresponding mirrored piece), with, as minimum coordinates, (0, // 0). If all is false, only generate half of the possibilities (used // to break the symmetry of the board). -fn transform(piece: Vec<(isize, isize)> , all: bool) -> Vec> { - let mut res: Vec> = +fn transform(piece: Vec<(i32, i32)> , all: bool) -> Vec> { + let mut res: Vec> = // rotations iterate(piece, |rot| rot.iter().map(|&(y, x)| (x + y, -y)).collect()) .take(if all {6} else {3}) @@ -133,7 +133,7 @@ fn transform(piece: Vec<(isize, isize)> , all: bool) -> Vec> // Takes a piece with minimum coordinate (0, 0) (as generated by // transform). Returns the corresponding mask if p translated by (dy, // dx) is on the board. -fn mask(dy: isize, dx: isize, id: usize, p: &Vec<(isize, isize)>) -> Option { +fn mask(dy: i32, dx: i32, id: usize, p: &Vec<(i32, i32)>) -> Option { let mut m = 1 << (50 + id); for &(y, x) in p.iter() { let x = x + dx + (y + (dy % 2)) / 2; @@ -164,12 +164,12 @@ fn make_masks() -> Vec > > { // To break the central symmetry of the problem, every // transformation must be taken except for one piece (piece 3 // here). - let transforms: Vec>> = + let transforms: Vec>> = pieces.into_iter().enumerate() .map(|(id, p)| transform(p, id != 3)) .collect(); - (0is..50).map(|yx| { + (0i32..50).map(|yx| { transforms.iter().enumerate().map(|(id, t)| { t.iter().filter_map(|p| mask(yx / 5, yx % 5, id, p)).collect() }).collect() diff --git a/src/test/compile-fail/array-not-vector.rs b/src/test/compile-fail/array-not-vector.rs index 2415288a3eb73..7111c00d1246a 100644 --- a/src/test/compile-fail/array-not-vector.rs +++ b/src/test/compile-fail/array-not-vector.rs @@ -9,18 +9,18 @@ // except according to those terms. fn main() { - let _x: isize = [1is, 2, 3]; + let _x: i32 = [1i32, 2, 3]; //~^ ERROR mismatched types - //~| expected `isize` - //~| found `[isize; 3]` - //~| expected isize + //~| expected `i32` + //~| found `[i32; 3]` + //~| expected i32 //~| found array of 3 elements - let x: &[isize] = &[1, 2, 3]; - let _y: &isize = x; + let x: &[i32] = &[1i32, 2, 3]; + let _y: &i32 = x; //~^ ERROR mismatched types - //~| expected `&isize` - //~| found `&[isize]` - //~| expected isize + //~| expected `&i32` + //~| found `&[i32]` + //~| expected i32 //~| found slice } diff --git a/src/test/compile-fail/array-old-syntax-1.rs b/src/test/compile-fail/array-old-syntax-1.rs index 3b4810a86abd5..71c57fefc2e26 100644 --- a/src/test/compile-fail/array-old-syntax-1.rs +++ b/src/test/compile-fail/array-old-syntax-1.rs @@ -11,5 +11,5 @@ // Test that the old fixed length array syntax is a parsing error. fn main() { - let _x: [isize, ..3] = [0is, 1, 2]; //~ ERROR + let _x: [isize, ..3] = [0, 1, 2]; //~ ERROR } diff --git a/src/test/compile-fail/array-old-syntax-2.rs b/src/test/compile-fail/array-old-syntax-2.rs index c1b88290bc39c..99ff3ae29f16f 100644 --- a/src/test/compile-fail/array-old-syntax-2.rs +++ b/src/test/compile-fail/array-old-syntax-2.rs @@ -11,5 +11,5 @@ // Test that the old repeating array syntax gives an error. fn main() { - let _ = [0is, ..3]; //~ ERROR + let _ = [0, ..3]; //~ ERROR } diff --git a/src/test/compile-fail/associated-types-eq-3.rs b/src/test/compile-fail/associated-types-eq-3.rs index fdfff559086f3..f01f2b111c5c1 100644 --- a/src/test/compile-fail/associated-types-eq-3.rs +++ b/src/test/compile-fail/associated-types-eq-3.rs @@ -45,7 +45,7 @@ pub fn baz(x: &Foo) { pub fn main() { - let a = 42is; + let a = 42; foo1(a); //~^ ERROR type mismatch resolving //~| expected usize diff --git a/src/test/compile-fail/associated-types-incomplete-object.rs b/src/test/compile-fail/associated-types-incomplete-object.rs index 31492406fedd3..1c708da30a707 100644 --- a/src/test/compile-fail/associated-types-incomplete-object.rs +++ b/src/test/compile-fail/associated-types-incomplete-object.rs @@ -28,15 +28,15 @@ impl Foo for isize { } pub fn main() { - let a = &42is as &Foo; + let a = &42 as &Foo; - let b = &42is as &Foo; + let b = &42 as &Foo; //~^ ERROR the value of the associated type `B` (from the trait `Foo`) must be specified - let c = &42is as &Foo; + let c = &42 as &Foo; //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified - let d = &42is as &Foo; + let d = &42 as &Foo; //~^ ERROR the value of the associated type `A` (from the trait `Foo`) must be specified //~| ERROR the value of the associated type `B` (from the trait `Foo`) must be specified } diff --git a/src/test/compile-fail/associated-types-path-2.rs b/src/test/compile-fail/associated-types-path-2.rs index 55ba65d6102be..51a37b517ddeb 100644 --- a/src/test/compile-fail/associated-types-path-2.rs +++ b/src/test/compile-fail/associated-types-path-2.rs @@ -14,8 +14,8 @@ pub trait Foo { type A; } -impl Foo for isize { - type A = usize; +impl Foo for i32 { + type A = u32; } pub fn f1(a: T, x: T::A) {} @@ -24,33 +24,33 @@ pub fn f2(a: T) -> T::A { } pub fn f1_int_int() { - f1(2is, 4is); + f1(2i32, 4i32); //~^ ERROR mismatched types - //~| expected usize - //~| found isize + //~| expected u32 + //~| found i32 } pub fn f1_int_uint() { - f1(2is, 4us); + f1(2i32, 4u32); } pub fn f1_uint_uint() { - f1(2us, 4us); + f1(2u32, 4u32); //~^ ERROR the trait `Foo` is not implemented //~| ERROR the trait `Foo` is not implemented } pub fn f1_uint_int() { - f1(2us, 4is); + f1(2u32, 4i32); //~^ ERROR the trait `Foo` is not implemented //~| ERROR the trait `Foo` is not implemented } pub fn f2_int() { - let _: isize = f2(2is); + let _: i32 = f2(2i32); //~^ ERROR mismatched types - //~| expected `isize` - //~| found `usize` + //~| expected `i32` + //~| found `u32` } pub fn main() { } diff --git a/src/test/compile-fail/bad-const-type.rs b/src/test/compile-fail/bad-const-type.rs index ed62506420a7c..7e3c356b87029 100644 --- a/src/test/compile-fail/bad-const-type.rs +++ b/src/test/compile-fail/bad-const-type.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static i: String = 10is; +static i: String = 10i32; //~^ ERROR mismatched types //~| expected `collections::string::String` -//~| found `isize` +//~| found `i32` //~| expected struct `collections::string::String` -//~| found isize +//~| found i32 fn main() { println!("{}", i); } diff --git a/src/test/compile-fail/bang-tailexpr.rs b/src/test/compile-fail/bang-tailexpr.rs index d17fa68b47cbe..7d79ea03c0245 100644 --- a/src/test/compile-fail/bang-tailexpr.rs +++ b/src/test/compile-fail/bang-tailexpr.rs @@ -9,6 +9,6 @@ // except according to those terms. fn f() -> ! { //~ ERROR computation may converge in a function marked as diverging - 3is + 3 } fn main() { } diff --git a/src/test/compile-fail/binop-logic-int.rs b/src/test/compile-fail/binop-logic-int.rs index 0067121e6103a..2217cf5e4dacb 100644 --- a/src/test/compile-fail/binop-logic-int.rs +++ b/src/test/compile-fail/binop-logic-int.rs @@ -8,6 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:`&&` cannot be applied to type `isize` +// error-pattern:`&&` cannot be applied to type `i32` -fn main() { let x = 1is && 2is; } +fn main() { let x = 1i32 && 2i32; } diff --git a/src/test/compile-fail/borrow-tuple-fields.rs b/src/test/compile-fail/borrow-tuple-fields.rs index e6fe60a9004b6..40e077bd1b55d 100644 --- a/src/test/compile-fail/borrow-tuple-fields.rs +++ b/src/test/compile-fail/borrow-tuple-fields.rs @@ -16,28 +16,28 @@ struct Foo(Box, isize); struct Bar(isize, isize); fn main() { - let x = (box 1is, 2is); + let x = (box 1, 2); let r = &x.0; let y = x; //~ ERROR cannot move out of `x` because it is borrowed - let mut x = (1is, 2is); + let mut x = (1, 2); let a = &x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as - let mut x = (1is, 2is); + let mut x = (1, 2); let a = &mut x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time - let x = Foo(box 1is, 2is); + let x = Foo(box 1, 2); let r = &x.0; let y = x; //~ ERROR cannot move out of `x` because it is borrowed - let mut x = Bar(1is, 2is); + let mut x = Bar(1, 2); let a = &x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable because it is also borrowed as - let mut x = Bar(1is, 2is); + let mut x = Bar(1, 2); let a = &mut x.0; let b = &mut x.0; //~ ERROR cannot borrow `x.0` as mutable more than once at a time } diff --git a/src/test/compile-fail/borrowck-anon-fields-tuple.rs b/src/test/compile-fail/borrowck-anon-fields-tuple.rs index 88486756b6659..ebaed01756fb2 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 = (1is, 2is); + let mut y = (1, 2); let a = match y { (ref mut a, _) => a @@ -27,7 +27,7 @@ fn distinct_variant() { } fn same_variant() { - let mut y = (1is, 2is); + let mut y = (1, 2); 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 ac9ddc2ce6503..3fb42b38e842c 100644 --- a/src/test/compile-fail/borrowck-array-double-move.rs +++ b/src/test/compile-fail/borrowck-array-double-move.rs @@ -12,9 +12,9 @@ #![feature(box_syntax)] fn f() { - let mut a = [box 0is, box 1is]; + let mut a = [box 0, box 1]; drop(a[0]); - a[1] = box 2is; + a[1] = box 2; 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 a52eaeeb9c3e3..82a6c92abafcf 100644 --- a/src/test/compile-fail/borrowck-break-uninit-2.rs +++ b/src/test/compile-fail/borrowck-break-uninit-2.rs @@ -11,14 +11,14 @@ fn foo() -> isize { let x: isize; - while 1is != 2 { + while 1 != 2 { break; x = 0; } println!("{}", x); //~ ERROR use of possibly uninitialized variable: `x` - return 17is; + return 17; } 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 29c7d6920bd95..9d73ad319a61c 100644 --- a/src/test/compile-fail/borrowck-closures-mut-and-imm.rs +++ b/src/test/compile-fail/borrowck-closures-mut-and-imm.rs @@ -22,37 +22,37 @@ fn set(x: &mut isize) { } fn a() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| x = 4; let c2 = |&mut:| x * 5; //~ ERROR cannot borrow `x` } fn b() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| set(&mut x); let c2 = |&mut:| get(&x); //~ ERROR cannot borrow `x` } fn c() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| set(&mut x); let c2 = |&mut:| x * 5; //~ ERROR cannot borrow `x` } fn d() { - let mut x = 3is; + let mut x = 3; let c2 = |&mut:| x * 5; x = 5; //~ ERROR cannot assign } fn e() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| get(&x); x = 5; //~ ERROR cannot assign } fn f() { - let mut x = box 3is; + let mut x = box 3; let c1 = |&mut:| get(&*x); *x = 5; //~ ERROR cannot assign } diff --git a/src/test/compile-fail/borrowck-closures-two-mut.rs b/src/test/compile-fail/borrowck-closures-two-mut.rs index 5cb49ab77114b..48a9dccfef0ba 100644 --- a/src/test/compile-fail/borrowck-closures-two-mut.rs +++ b/src/test/compile-fail/borrowck-closures-two-mut.rs @@ -15,7 +15,7 @@ #![feature(box_syntax)] fn a() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| x = 4; let c2 = |&mut:| x = 5; //~ ERROR cannot borrow `x` as mutable more than once } @@ -25,19 +25,19 @@ fn set(x: &mut isize) { } fn b() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| set(&mut x); let c2 = |&mut:| set(&mut x); //~ ERROR cannot borrow `x` as mutable more than once } fn c() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| x = 5; let c2 = |&mut:| set(&mut x); //~ ERROR cannot borrow `x` as mutable more than once } fn d() { - let mut x = 3is; + let mut x = 3; let c1 = |&mut:| x = 5; let c2 = |&mut:| { let _y = |&mut:| set(&mut x); }; // (nested closure) //~^ ERROR cannot borrow `x` as mutable more than once diff --git a/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs b/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs index 6884ac153a16b..ad77953bdd8d0 100644 --- a/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs +++ b/src/test/compile-fail/borrowck-for-loop-correct-cmt-for-pattern.rs @@ -17,7 +17,7 @@ struct Foo { } fn main() { - let mut y = 1is; + let mut y = 1; let x = Some(&mut y); for &a in x.iter() { //~ ERROR cannot move out } @@ -28,7 +28,7 @@ fn main() { for &a in f.a.iter() { //~ ERROR cannot move out } - let x = Some(box 1is); + let x = Some(box 1); for &a in x.iter() { //~ ERROR cannot move out } } diff --git a/src/test/compile-fail/borrowck-if-no-else.rs b/src/test/compile-fail/borrowck-if-no-else.rs index b98833776fbaf..74b542800b9e9 100644 --- a/src/test/compile-fail/borrowck-if-no-else.rs +++ b/src/test/compile-fail/borrowck-if-no-else.rs @@ -11,6 +11,6 @@ fn foo(x: isize) { println!("{}", x); } fn main() { - let x: isize; if 1is > 2 { x = 10; } + let x: isize; if 1 > 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 c74edfd8d070c..f3b02d12854a8 100644 --- a/src/test/compile-fail/borrowck-if-with-else.rs +++ b/src/test/compile-fail/borrowck-if-with-else.rs @@ -12,7 +12,7 @@ fn foo(x: isize) { println!("{}", x); } fn main() { let x: isize; - if 1is > 2 { + if 1 > 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 fabfce6ffb388..8af10231921aa 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 = 3is; + let mut _a = 3; 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 dc1c73efc409e..0c717d2ee5fff 100644 --- a/src/test/compile-fail/borrowck-issue-2657-1.rs +++ b/src/test/compile-fail/borrowck-issue-2657-1.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = Some(box 1is); + let x = Some(box 1); 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 0b76044f8d61b..b4e5ae1c25bf7 100644 --- a/src/test/compile-fail/borrowck-issue-2657-2.rs +++ b/src/test/compile-fail/borrowck-issue-2657-2.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = Some(box 1is); + let x = Some(box 1); match x { Some(ref y) => { let _b = *y; //~ ERROR cannot move out diff --git a/src/test/compile-fail/borrowck-lend-flow-loop.rs b/src/test/compile-fail/borrowck-lend-flow-loop.rs index 545c766308545..5418a531fe68a 100644 --- a/src/test/compile-fail/borrowck-lend-flow-loop.rs +++ b/src/test/compile-fail/borrowck-lend-flow-loop.rs @@ -41,7 +41,7 @@ fn block_overarching_alias_mut() { let mut v = box 3; let mut x = &mut v; - for _ in 0is..3 { + for _ in 0..3 { borrow(&*v); //~ ERROR cannot borrow } *x = box 5; diff --git a/src/test/compile-fail/borrowck-lend-flow-match.rs b/src/test/compile-fail/borrowck-lend-flow-match.rs index f501682847f5f..30ec993ed5e05 100644 --- a/src/test/compile-fail/borrowck-lend-flow-match.rs +++ b/src/test/compile-fail/borrowck-lend-flow-match.rs @@ -19,10 +19,10 @@ fn separate_arms() { None => { // It is ok to reassign x here, because there is in // fact no outstanding loan of x! - x = Some(0is); + x = Some(0); } Some(ref _i) => { - x = Some(1is); //~ ERROR cannot assign + x = Some(1); //~ ERROR cannot assign } } x.clone(); // just to prevent liveness warnings diff --git a/src/test/compile-fail/borrowck-let-suggestion.rs b/src/test/compile-fail/borrowck-let-suggestion.rs index a08021919df85..5729f8c56179e 100644 --- a/src/test/compile-fail/borrowck-let-suggestion.rs +++ b/src/test/compile-fail/borrowck-let-suggestion.rs @@ -9,7 +9,7 @@ // except according to those terms. fn f() { - let x = [1is].iter(); //~ ERROR borrowed value does not live long enough + let x = [1].iter(); //~ ERROR borrowed value does not live long enough //~^ NOTE reference must be valid for the block suffix following statement //~^^ HELP consider using a `let` binding to increase its lifetime } diff --git a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs index bff22257760eb..980c498e39b47 100644 --- a/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs +++ b/src/test/compile-fail/borrowck-loan-blocks-move-cc.rs @@ -17,7 +17,7 @@ fn borrow(v: &isize, f: F) where F: FnOnce(&isize) { } fn box_imm() { - let v = box 3is; + let v = box 3; let _w = &v; Thread::spawn(move|| { println!("v={}", *v); @@ -26,7 +26,7 @@ fn box_imm() { } fn box_imm_explicit() { - let v = box 3is; + let v = box 3; let _w = &v; Thread::spawn(move|| { println!("v={}", *v); diff --git a/src/test/compile-fail/borrowck-match-binding-is-assignment.rs b/src/test/compile-fail/borrowck-match-binding-is-assignment.rs index 575d67c0b834a..38593d31842eb 100644 --- a/src/test/compile-fail/borrowck-match-binding-is-assignment.rs +++ b/src/test/compile-fail/borrowck-match-binding-is-assignment.rs @@ -19,7 +19,7 @@ struct S { } pub fn main() { - match 1is { + match 1 { x => { x += 1; //~ ERROR re-assignment of immutable variable `x` } @@ -37,13 +37,13 @@ pub fn main() { } } - match (1is,) { + match (1,) { (x,) => { x += 1; //~ ERROR re-assignment of immutable variable `x` } } - match [1is,2,3] { + match [1,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 0d1a51bbf351e..3d8d599970f2c 100644 --- a/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs +++ b/src/test/compile-fail/borrowck-move-from-subpath-of-borrowed-path.rs @@ -14,7 +14,7 @@ #![feature(box_syntax)] fn main() { - let a = box box 2is; + let a = box box 2; 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 507f073adb2e1..27cef1f3c6068 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!(1is, 2)).into_iter(); + let _x = Rc::new(vec!(1, 2)).into_iter(); //~^ ERROR cannot move out of borrowed content } diff --git a/src/test/compile-fail/borrowck-multiple-captures.rs b/src/test/compile-fail/borrowck-multiple-captures.rs index 33ac5d7fceba0..94e213ae1ae5b 100644 --- a/src/test/compile-fail/borrowck-multiple-captures.rs +++ b/src/test/compile-fail/borrowck-multiple-captures.rs @@ -15,9 +15,9 @@ use std::thread::Thread; fn borrow(_: &T) { } fn different_vars_after_borrows() { - let x1 = box 1is; + let x1 = box 1; let p1 = &x1; - let x2 = box 2is; + let x2 = box 2; let p2 = &x2; Thread::spawn(move|| { drop(x1); //~ ERROR cannot move `x1` into closure because it is borrowed @@ -28,9 +28,9 @@ fn different_vars_after_borrows() { } fn different_vars_after_moves() { - let x1 = box 1is; + let x1 = box 1; drop(x1); - let x2 = box 2is; + let x2 = box 2; drop(x2); Thread::spawn(move|| { drop(x1); //~ ERROR capture of moved value: `x1` @@ -39,7 +39,7 @@ fn different_vars_after_moves() { } fn same_var_after_borrow() { - let x = box 1is; + let x = box 1; let p = &x; Thread::spawn(move|| { drop(x); //~ ERROR cannot move `x` into closure because it is borrowed @@ -49,7 +49,7 @@ fn same_var_after_borrow() { } fn same_var_after_move() { - let x = box 1is; + let x = box 1; drop(x); Thread::spawn(move|| { drop(x); //~ ERROR capture of moved value: `x` diff --git a/src/test/compile-fail/borrowck-overloaded-index-2.rs b/src/test/compile-fail/borrowck-overloaded-index-2.rs index da3da47fa9029..e9d8544a06a90 100644 --- a/src/test/compile-fail/borrowck-overloaded-index-2.rs +++ b/src/test/compile-fail/borrowck-overloaded-index-2.rs @@ -25,7 +25,7 @@ impl Index for MyVec { } fn main() { - let v = MyVec { data: vec!(box 1is, box 2, box 3) }; + let v = MyVec { data: vec!(box 1, box 2, box 3) }; let good = &v[0]; // Shouldn't fail here let bad = v[0]; //~^ ERROR cannot move out of indexed content diff --git a/src/test/compile-fail/borrowck-uniq-via-lend.rs b/src/test/compile-fail/borrowck-uniq-via-lend.rs index 7fadf6d466033..49a1b782a3db4 100644 --- a/src/test/compile-fail/borrowck-uniq-via-lend.rs +++ b/src/test/compile-fail/borrowck-uniq-via-lend.rs @@ -13,7 +13,7 @@ fn borrow(_v: &isize) {} fn local() { - let mut v = box 3is; + let mut v = box 3; borrow(&*v); } @@ -32,27 +32,27 @@ fn local_recs() { } fn aliased_imm() { - let mut v = box 3is; + let mut v = box 3; let _w = &v; borrow(&*v); } fn aliased_mut() { - let mut v = box 3is; + let mut v = box 3; let _w = &mut v; borrow(&*v); //~ ERROR cannot borrow `*v` } fn aliased_other() { - let mut v = box 3is; - let mut w = box 4is; + let mut v = box 3; + let mut w = box 4; let _x = &mut w; borrow(&*v); } fn aliased_other_reassign() { - let mut v = box 3is; - let mut w = box 4is; + let mut v = box 3; + let mut w = box 4; 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 8869e99efd52a..5f58027af5337 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 = [1is, 2, 3, 4]; + let mut a = [1, 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 49994ebdbba44..e125d777371c8 100644 --- a/src/test/compile-fail/borrowck-vec-pattern-nesting.rs +++ b/src/test/compile-fail/borrowck-vec-pattern-nesting.rs @@ -12,7 +12,7 @@ #![feature(box_syntax)] fn a() { - let mut vec = [box 1is, box 2, box 3]; + let mut vec = [box 1, box 2, box 3]; match vec { [box ref _a, _, _] => { vec[0] = box 4; //~ ERROR cannot assign @@ -21,7 +21,7 @@ fn a() { } fn b() { - let mut vec = vec!(box 1is, box 2, box 3); + let mut vec = vec!(box 1, box 2, box 3); let vec: &mut [Box] = vec.as_mut_slice(); match vec { [_b..] => { @@ -31,7 +31,7 @@ fn b() { } fn c() { - let mut vec = vec!(box 1is, box 2, box 3); + let mut vec = vec!(box 1, box 2, box 3); let vec: &mut [Box] = vec.as_mut_slice(); match vec { [_a, //~ ERROR cannot move out @@ -49,7 +49,7 @@ fn c() { } fn d() { - let mut vec = vec!(box 1is, box 2, box 3); + let mut vec = vec!(box 1, box 2, box 3); let vec: &mut [Box] = vec.as_mut_slice(); match vec { [_a.., //~ ERROR cannot move out @@ -60,7 +60,7 @@ fn d() { } fn e() { - let mut vec = vec!(box 1is, box 2, box 3); + let mut vec = vec!(box 1, box 2, box 3); let vec: &mut [Box] = vec.as_mut_slice(); match vec { [_a, _b, _c] => {} //~ ERROR cannot move out diff --git a/src/test/compile-fail/borrowck-while-break.rs b/src/test/compile-fail/borrowck-while-break.rs index 4752120d69126..8cdf1da5c934c 100644 --- a/src/test/compile-fail/borrowck-while-break.rs +++ b/src/test/compile-fail/borrowck-while-break.rs @@ -11,7 +11,7 @@ fn test(cond: bool) { let v; while cond { - v = 3is; + v = 3; break; } println!("{}", v); //~ ERROR use of possibly uninitialized variable: `v` diff --git a/src/test/compile-fail/borrowck-while.rs b/src/test/compile-fail/borrowck-while.rs index f163cf602bfa6..e3566e9bb920d 100644 --- a/src/test/compile-fail/borrowck-while.rs +++ b/src/test/compile-fail/borrowck-while.rs @@ -10,7 +10,7 @@ fn f() -> isize { let mut x: isize; - while 1is == 1 { x = 10; } + while 1 == 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 0ec4f3dce1171..a6d55ad3991f3 100644 --- a/src/test/compile-fail/builtin-superkinds-self-type.rs +++ b/src/test/compile-fail/builtin-superkinds-self-type.rs @@ -22,6 +22,6 @@ impl Foo for T { } fn main() { let (tx, rx) = channel(); - 1193182is.foo(tx); - assert!(rx.recv() == 1193182is); + 1193182.foo(tx); + assert!(rx.recv() == 1193182); } diff --git a/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs b/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs index b106169c6fcf4..2951c63828d5c 100644 --- a/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs +++ b/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let x = 1is; + let x = 1; move|:| { x = 2; }; //~^ ERROR: cannot assign to immutable captured outer variable diff --git a/src/test/compile-fail/coercion-slice.rs b/src/test/compile-fail/coercion-slice.rs index d7a37d2699186..aac180f9ad7bf 100644 --- a/src/test/compile-fail/coercion-slice.rs +++ b/src/test/compile-fail/coercion-slice.rs @@ -11,10 +11,10 @@ // Tests that we forbid coercion from `[T; n]` to `&[T]` fn main() { - let _: &[isize] = [0is]; + let _: &[i32] = [0i32]; //~^ ERROR mismatched types - //~| expected `&[isize]` - //~| found `[isize; 1]` + //~| expected `&[i32]` + //~| found `[i32; 1]` //~| expected &-ptr //~| found array of 1 elements } diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs index 5cc0d6a143ae2..21098f9283e7f 100644 --- a/src/test/compile-fail/destructure-trait-ref.rs +++ b/src/test/compile-fail/destructure-trait-ref.rs @@ -27,29 +27,29 @@ fn main() { // if n > m, it's a type mismatch error. // n < m - let &x = &(&1is as &T); - let &x = &&(&1is as &T); - let &&x = &&(&1is as &T); + let &x = &(&1 as &T); + let &x = &&(&1 as &T); + let &&x = &&(&1 as &T); // n == m - let &x = &1is as &T; //~ ERROR type `&T` cannot be dereferenced - let &&x = &(&1is as &T); //~ ERROR type `&T` cannot be dereferenced - let box x = box 1is as Box; //~ ERROR type `Box` cannot be dereferenced + let &x = &1 as &T; //~ ERROR type `&T` cannot be dereferenced + let &&x = &(&1 as &T); //~ ERROR type `&T` cannot be dereferenced + let box x = box 1 as Box; //~ ERROR type `Box` cannot be dereferenced // n > m - let &&x = &1is as &T; + let &&x = &1 as &T; //~^ ERROR mismatched types //~| expected `T` //~| found `&_` //~| expected trait T //~| found &-ptr - let &&&x = &(&1is as &T); + let &&&x = &(&1 as &T); //~^ ERROR mismatched types //~| expected `T` //~| found `&_` //~| expected trait T //~| found &-ptr - let box box x = box 1is as Box; + let box box x = box 1 as Box; //~^ ERROR mismatched types //~| expected `T` //~| found `Box<_>` diff --git a/src/test/compile-fail/dst-bad-deep.rs b/src/test/compile-fail/dst-bad-deep.rs index 032835d9460cb..f90baafef3ffa 100644 --- a/src/test/compile-fail/dst-bad-deep.rs +++ b/src/test/compile-fail/dst-bad-deep.rs @@ -18,7 +18,7 @@ struct Fat { } pub fn main() { - let f: Fat<[isize; 3]> = Fat { ptr: [5is, 6, 7] }; + let f: Fat<[isize; 3]> = Fat { ptr: [5, 6, 7] }; let g: &Fat<[isize]> = &f; let h: &Fat> = &Fat { ptr: *g }; //~^ ERROR the trait `core::marker::Sized` is not implemented diff --git a/src/test/compile-fail/feature-gate-advanced-slice-features.rs b/src/test/compile-fail/feature-gate-advanced-slice-features.rs index a37a8a326a66c..d5841e1e77e40 100644 --- a/src/test/compile-fail/feature-gate-advanced-slice-features.rs +++ b/src/test/compile-fail/feature-gate-advanced-slice-features.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let x = [ 1is, 2, 3, 4, 5 ]; + let x = [ 1, 2, 3, 4, 5 ]; match x { [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches diff --git a/src/test/compile-fail/fn-trait-formatting.rs b/src/test/compile-fail/fn-trait-formatting.rs index 460e05c8438cd..f8e7dc11828ff 100644 --- a/src/test/compile-fail/fn-trait-formatting.rs +++ b/src/test/compile-fail/fn-trait-formatting.rs @@ -34,7 +34,7 @@ fn main() { //~| expected () //~| found box - needs_fn(1is); + needs_fn(1); //~^ ERROR `core::ops::Fn<(isize,)>` //~| ERROR `core::ops::Fn<(isize,)>` } diff --git a/src/test/compile-fail/for-loop-refutable-pattern-error-message.rs b/src/test/compile-fail/for-loop-refutable-pattern-error-message.rs index fa55e7215c0b2..ab6dc2bab3ecb 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 @@ -10,6 +10,6 @@ fn main() { for - &1is //~ ERROR refutable pattern in `for` loop binding - in [1is].iter() {} + &1 //~ ERROR refutable pattern in `for` loop binding + in [1].iter() {} } diff --git a/src/test/compile-fail/hashmap-iter-value-lifetime.rs b/src/test/compile-fail/hashmap-iter-value-lifetime.rs index db1e1e8efe42f..9cf145a1ff387 100644 --- a/src/test/compile-fail/hashmap-iter-value-lifetime.rs +++ b/src/test/compile-fail/hashmap-iter-value-lifetime.rs @@ -10,7 +10,7 @@ fn main() { let mut my_stuff = std::collections::HashMap::new(); - my_stuff.insert(0is, 42is); + my_stuff.insert(0, 42); let (_, thing) = my_stuff.iter().next().unwrap(); diff --git a/src/test/compile-fail/hashmap-lifetimes.rs b/src/test/compile-fail/hashmap-lifetimes.rs index 40673dd92b89d..6858599f63a8a 100644 --- a/src/test/compile-fail/hashmap-lifetimes.rs +++ b/src/test/compile-fail/hashmap-lifetimes.rs @@ -10,7 +10,7 @@ fn main() { let mut my_stuff = std::collections::HashMap::new(); - my_stuff.insert(0is, 42is); + my_stuff.insert(0, 42); let mut it = my_stuff.iter(); my_stuff.insert(1, 43); //~ ERROR cannot borrow diff --git a/src/test/compile-fail/if-branch-types.rs b/src/test/compile-fail/if-branch-types.rs index 2209a02c63918..b7a5b991c6d56 100644 --- a/src/test/compile-fail/if-branch-types.rs +++ b/src/test/compile-fail/if-branch-types.rs @@ -9,10 +9,10 @@ // except according to those terms. fn main() { - let x = if true { 10is } else { 10us }; + let x = if true { 10i32 } else { 10u32 }; //~^ ERROR if and else have incompatible types - //~| expected `isize` - //~| found `usize` - //~| expected isize - //~| found usize + //~| expected `i32` + //~| found `u32` + //~| expected i32 + //~| found u32 } diff --git a/src/test/compile-fail/if-let.rs b/src/test/compile-fail/if-let.rs index d83779c4f0f0c..1e9144910b053 100644 --- a/src/test/compile-fail/if-let.rs +++ b/src/test/compile-fail/if-let.rs @@ -20,20 +20,20 @@ fn macros() { }} } - foo!(a, 1is, { //~ ERROR irrefutable if-let + foo!(a, 1, { //~ ERROR irrefutable if-let println!("irrefutable pattern"); }); - bar!(a, 1is, { //~ ERROR irrefutable if-let + bar!(a, 1, { //~ ERROR irrefutable if-let println!("irrefutable pattern"); }); } pub fn main() { - if let a = 1is { //~ ERROR irrefutable if-let + if let a = 1 { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } - if let a = 1is { //~ ERROR irrefutable if-let + if let a = 1 { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } else if true { println!("else-if in irrefutable if-let"); @@ -41,15 +41,15 @@ pub fn main() { println!("else in irrefutable if-let"); } - if let 1is = 2is { + if let 1 = 2 { println!("refutable pattern"); - } else if let a = 1is { //~ ERROR irrefutable if-let + } else if let a = 1 { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } if true { println!("if"); - } else if let a = 1is { //~ ERROR irrefutable if-let + } else if let a = 1 { //~ ERROR irrefutable if-let println!("irrefutable pattern"); } } diff --git a/src/test/compile-fail/implicit-method-bind.rs b/src/test/compile-fail/implicit-method-bind.rs index d329f72f788ae..6a9c304805274 100644 --- a/src/test/compile-fail/implicit-method-bind.rs +++ b/src/test/compile-fail/implicit-method-bind.rs @@ -11,5 +11,5 @@ use std::num::SignedInt; fn main() { - let _f = 10is.abs; //~ ERROR attempted to take value of method + let _f = 10.abs; //~ ERROR attempted to take value of method } diff --git a/src/test/compile-fail/int-literal-too-large-span.rs b/src/test/compile-fail/int-literal-too-large-span.rs index 2aeaf6efaa4c0..8a496c934b9c9 100644 --- a/src/test/compile-fail/int-literal-too-large-span.rs +++ b/src/test/compile-fail/int-literal-too-large-span.rs @@ -11,7 +11,7 @@ // issue #17123 fn main() { - 100000000000000000000000000000000is //~ ERROR int literal is too large + 100000000000000000000000000000000 //~ ERROR int literal is too large ; // the span shouldn't point to this. } diff --git a/src/test/compile-fail/issue-10398.rs b/src/test/compile-fail/issue-10398.rs index c1102bc84aba7..5ee693d97a878 100644 --- a/src/test/compile-fail/issue-10398.rs +++ b/src/test/compile-fail/issue-10398.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = box 1is; + let x = box 1; let f = move|:| { let _a = x; drop(x); diff --git a/src/test/compile-fail/issue-11493.rs b/src/test/compile-fail/issue-11493.rs index 895eb4cf96f43..333ff7118d45b 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(3is); - let y = x.as_ref().unwrap_or(&5is); //~ ERROR: borrowed value does not live long enough + let x = Some(3); + let y = x.as_ref().unwrap_or(&5); //~ ERROR: borrowed value does not live long enough } diff --git a/src/test/compile-fail/issue-11714.rs b/src/test/compile-fail/issue-11714.rs index eef035d3d9445..d307352517fea 100644 --- a/src/test/compile-fail/issue-11714.rs +++ b/src/test/compile-fail/issue-11714.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -fn blah() -> isize { //~ ERROR not all control paths return a value - 1is +fn blah() -> i32 { //~ ERROR not all control paths return a value + 1i32 ; //~ HELP consider removing this semicolon: } diff --git a/src/test/compile-fail/issue-11873.rs b/src/test/compile-fail/issue-11873.rs index 67578de89226e..f9a523641e41e 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!(1is); - let mut f = |&mut:| v.push(2is); + let mut v = vec!(1); + let mut f = |&mut:| v.push(2); 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 e5f3b7d62d386..69f7b46009c38 100644 --- a/src/test/compile-fail/issue-11925.rs +++ b/src/test/compile-fail/issue-11925.rs @@ -12,7 +12,7 @@ fn main() { let r = { - let x = box 42is; + let x = box 42; let f = move|:| &x; //~ ERROR: `x` does not live long enough f() }; diff --git a/src/test/compile-fail/issue-12041.rs b/src/test/compile-fail/issue-12041.rs index 02c19204f79ff..236142a691921 100644 --- a/src/test/compile-fail/issue-12041.rs +++ b/src/test/compile-fail/issue-12041.rs @@ -17,7 +17,7 @@ fn main() { loop { let tx = tx; //~^ ERROR: use of moved value: `tx` - tx.send(1is); + tx.send(1); } }); } diff --git a/src/test/compile-fail/issue-1362.rs b/src/test/compile-fail/issue-1362.rs index 28d16f9c0b787..d51db4795998b 100644 --- a/src/test/compile-fail/issue-1362.rs +++ b/src/test/compile-fail/issue-1362.rs @@ -11,7 +11,7 @@ // Regression test for issue #1362 - without that fix the span will be bogus // no-reformat fn main() { - let x: usize = 20is; //~ ERROR mismatched types + let x: u32 = 20i32; //~ ERROR mismatched types } // NOTE: Do not add any extra lines as the line number the error is // on is significant; an error later in the source file might not diff --git a/src/test/compile-fail/issue-1448-2.rs b/src/test/compile-fail/issue-1448-2.rs index 371adf931b066..ddfed3647c2e0 100644 --- a/src/test/compile-fail/issue-1448-2.rs +++ b/src/test/compile-fail/issue-1448-2.rs @@ -10,8 +10,8 @@ // Regression test for issue #1448 and #1386 -fn foo(a: usize) -> usize { a } +fn foo(a: u32) -> u32 { a } fn main() { - println!("{}", foo(10is)); //~ ERROR mismatched types + println!("{}", foo(10i32)); //~ ERROR mismatched types } diff --git a/src/test/compile-fail/issue-15094.rs b/src/test/compile-fail/issue-15094.rs index 977586483b031..8f79022405ebe 100644 --- a/src/test/compile-fail/issue-15094.rs +++ b/src/test/compile-fail/issue-15094.rs @@ -30,6 +30,6 @@ fn make_shower(x: T) -> Debuger { } pub fn main() { - let show3 = make_shower(3is); + let show3 = make_shower(3); show3(); } diff --git a/src/test/compile-fail/issue-15167.rs b/src/test/compile-fail/issue-15167.rs index c98c543462e97..7da1b9efd3942 100644 --- a/src/test/compile-fail/issue-15167.rs +++ b/src/test/compile-fail/issue-15167.rs @@ -18,7 +18,7 @@ macro_rules! f { () => (n) } fn main() -> (){ - for n in 0is..1 { + for n in 0..1 { println!("{}", f!()); //~ ERROR unresolved name `n` } } diff --git a/src/test/compile-fail/issue-15480.rs b/src/test/compile-fail/issue-15480.rs index 59d87b5277a46..1e4476e563b04 100644 --- a/src/test/compile-fail/issue-15480.rs +++ b/src/test/compile-fail/issue-15480.rs @@ -10,7 +10,7 @@ fn main() { let v = vec![ - &3is + &3 //~^ ERROR borrowed value does not live long enough ]; diff --git a/src/test/compile-fail/issue-17385.rs b/src/test/compile-fail/issue-17385.rs index 38278c524c886..eb293c7924705 100644 --- a/src/test/compile-fail/issue-17385.rs +++ b/src/test/compile-fail/issue-17385.rs @@ -23,10 +23,10 @@ impl Drop for Enum { } fn main() { - let foo = X(1is); + let foo = X(1); drop(foo); match foo { //~ ERROR use of moved value - X(1is) => (), + X(1) => (), _ => unreachable!() } diff --git a/src/test/compile-fail/issue-17405.rs b/src/test/compile-fail/issue-17405.rs index 63120e85b0973..de8a4f63476dc 100644 --- a/src/test/compile-fail/issue-17405.rs +++ b/src/test/compile-fail/issue-17405.rs @@ -13,7 +13,7 @@ enum Foo { } fn main() { - match Foo::Bar(1is) { + match Foo::Bar(1) { Foo { i } => () //~ ERROR `Foo` does not name a struct or a struct variant } } diff --git a/src/test/compile-fail/issue-17800.rs b/src/test/compile-fail/issue-17800.rs index 89611e4f3fe78..5196b6ea877f8 100644 --- a/src/test/compile-fail/issue-17800.rs +++ b/src/test/compile-fail/issue-17800.rs @@ -14,8 +14,8 @@ enum MyOption { } fn main() { - match MyOption::MySome(42is) { - MyOption::MySome { x: 42is } => (), + match MyOption::MySome(42) { + MyOption::MySome { x: 42 } => (), //~^ ERROR `MyOption::MySome` does not name a struct or a struct variant _ => (), } diff --git a/src/test/compile-fail/issue-17905.rs b/src/test/compile-fail/issue-17905.rs index d5973abc462ed..eabdb36a7efc6 100644 --- a/src/test/compile-fail/issue-17905.rs +++ b/src/test/compile-fail/issue-17905.rs @@ -25,6 +25,6 @@ impl Pair< } fn main() { - let result = &Pair("shane", 1is); + let result = &Pair("shane", 1); result.say(); } diff --git a/src/test/compile-fail/issue-17999.rs b/src/test/compile-fail/issue-17999.rs index f336fdbfbed95..f4c0a9c38c3fc 100644 --- a/src/test/compile-fail/issue-17999.rs +++ b/src/test/compile-fail/issue-17999.rs @@ -12,7 +12,7 @@ #![feature(core)] fn main() { - for _ in 1is..101 { + for _ in 1..101 { let x = (); //~ ERROR: unused variable: `x` match () { a => {} //~ ERROR: unused variable: `a` diff --git a/src/test/compile-fail/issue-19096.rs b/src/test/compile-fail/issue-19096.rs index 7bc79463d3a95..90d2acbe5816a 100644 --- a/src/test/compile-fail/issue-19096.rs +++ b/src/test/compile-fail/issue-19096.rs @@ -9,6 +9,6 @@ // except according to those terms. fn main() { - let t = (42is, 42is); + let t = (42, 42); t.0::; //~ ERROR expected one of `.`, `;`, `}`, or an operator, found `::` } diff --git a/src/test/compile-fail/issue-1962.rs b/src/test/compile-fail/issue-1962.rs index 44abfca165324..db3e9c23b7621 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 = 0is; + let mut i = 0; while true { //~ ERROR denote infinite loops with loop - i += 1is; - if i == 5is { break; } + i += 1; + if i == 5 { break; } } } diff --git a/src/test/compile-fail/issue-3707.rs b/src/test/compile-fail/issue-3707.rs index 0aa357f239851..0d57a8a50cc6a 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 1is+1 == 2 + return 1+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(); - 1is + 1; + 1 + 1; } diff --git a/src/test/compile-fail/issue-4335.rs b/src/test/compile-fail/issue-4335.rs index 292d1d9616a1d..3d44c1a52d492 100644 --- a/src/test/compile-fail/issue-4335.rs +++ b/src/test/compile-fail/issue-4335.rs @@ -18,6 +18,6 @@ fn f<'r, T>(v: &'r T) -> Box T + 'r> { } fn main() { - let v = &5is; + let v = &5; println!("{}", f(v).call_mut(())); } diff --git a/src/test/compile-fail/issue-7867.rs b/src/test/compile-fail/issue-7867.rs index 0e81ec19c815a..7bb4aac23d65c 100644 --- a/src/test/compile-fail/issue-7867.rs +++ b/src/test/compile-fail/issue-7867.rs @@ -23,16 +23,16 @@ fn main() { _ => () } - match &Some(42is) { + match &Some(42i32) { Some(x) => (), //~^ ERROR mismatched types - //~| expected `&core::option::Option` + //~| expected `&core::option::Option` //~| found `core::option::Option<_>` //~| expected &-ptr //~| found enum `core::option::Option` None => () //~^ ERROR mismatched types - //~| expected `&core::option::Option` + //~| expected `&core::option::Option` //~| found `core::option::Option<_>` //~| expected &-ptr //~| found enum `core::option::Option` diff --git a/src/test/compile-fail/kindck-impl-type-params-2.rs b/src/test/compile-fail/kindck-impl-type-params-2.rs index cd47bd721fcfd..2731be7308a4a 100644 --- a/src/test/compile-fail/kindck-impl-type-params-2.rs +++ b/src/test/compile-fail/kindck-impl-type-params-2.rs @@ -19,7 +19,7 @@ impl Foo for T { fn take_param(foo: &T) { } fn main() { - let x = box 3is; + let x = box 3; take_param(&x); //~^ ERROR the trait `core::marker::Copy` is not implemented } diff --git a/src/test/compile-fail/kindck-inherited-copy-bound.rs b/src/test/compile-fail/kindck-inherited-copy-bound.rs index 4ccb240071d04..e146cac21a31c 100644 --- a/src/test/compile-fail/kindck-inherited-copy-bound.rs +++ b/src/test/compile-fail/kindck-inherited-copy-bound.rs @@ -23,12 +23,12 @@ impl Foo for T { fn take_param(foo: &T) { } fn a() { - let x = box 3is; + let x = box 3; take_param(&x); //~ ERROR `core::marker::Copy` is not implemented } fn b() { - let x = box 3is; + let x = box 3; let y = &x; let z = &x as &Foo; //~ ERROR `core::marker::Copy` is not implemented } diff --git a/src/test/compile-fail/lint-dead-code-1.rs b/src/test/compile-fail/lint-dead-code-1.rs index dc59194373124..519839ae2f4cb 100644 --- a/src/test/compile-fail/lint-dead-code-1.rs +++ b/src/test/compile-fail/lint-dead-code-1.rs @@ -91,7 +91,7 @@ pub fn pub_fn() { let e = used_enum::foo3; SemiUsedStruct::la_la_la(); - let i = 1is; + let i = 1; match i { USED_STATIC => (), USED_CONST => (), diff --git a/src/test/compile-fail/lint-dead-code-3.rs b/src/test/compile-fail/lint-dead-code-3.rs index be135978d2dad..f60c39ba02085 100644 --- a/src/test/compile-fail/lint-dead-code-3.rs +++ b/src/test/compile-fail/lint-dead-code-3.rs @@ -86,6 +86,6 @@ mod inner { } pub fn foo() { - let a = &1is as &inner::Trait; + let a = &1 as &inner::Trait; a.f(); } diff --git a/src/test/compile-fail/lint-unnecessary-parens.rs b/src/test/compile-fail/lint-unnecessary-parens.rs index 4ccc3d8b64151..b5eac73a55d1c 100644 --- a/src/test/compile-fail/lint-unnecessary-parens.rs +++ b/src/test/compile-fail/lint-unnecessary-parens.rs @@ -17,7 +17,7 @@ impl X { } fn foo() -> isize { - return (1is); //~ ERROR unnecessary parentheses around `return` value + return (1); //~ ERROR unnecessary parentheses around `return` value } fn bar() -> X { return (X { y: true }); //~ ERROR unnecessary parentheses around `return` value @@ -32,8 +32,8 @@ fn main() { match (true) { //~ ERROR unnecessary parentheses around `match` head expression _ => {} } - if let 1is = (1is) {} //~ ERROR unnecessary parentheses around `if let` head expression - while let 1is = (2is) {} //~ ERROR unnecessary parentheses around `while let` head expression + if let 1 = (1) {} //~ ERROR unnecessary parentheses around `if let` head expression + while let 1 = (2) {} //~ ERROR unnecessary parentheses around `while let` head expression let v = X { y: false }; // struct lits needs parens, so these shouldn't warn. if (v == X { y: true }) {} @@ -47,7 +47,7 @@ fn main() { _ => {} } - let mut _a = (0is); //~ ERROR unnecessary parentheses around assigned value - _a = (0is); //~ ERROR unnecessary parentheses around assigned value - _a += (1is); //~ ERROR unnecessary parentheses around assigned value + 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 } diff --git a/src/test/compile-fail/lint-unused-imports.rs b/src/test/compile-fail/lint-unused-imports.rs index 84d7200314f9d..1468ae64d9418 100644 --- a/src/test/compile-fail/lint-unused-imports.rs +++ b/src/test/compile-fail/lint-unused-imports.rs @@ -54,7 +54,7 @@ mod bar { pub mod c { use foo::Point; use foo::Square; //~ ERROR unused import - pub fn cc(p: Point) -> isize { return 2is * (p.x + p.y); } + pub fn cc(p: Point) -> isize { return 2 * (p.x + p.y); } } #[allow(unused_imports)] @@ -65,8 +65,8 @@ mod bar { fn main() { cal(foo::Point{x:3, y:9}); - let mut a = 3is; - let mut b = 4is; + let mut a = 3; + let mut b = 4; 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 501eea770d814..ddba7b58afaab 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 = 3is; //~ ERROR: variable does not need to be mutable - let mut a = 2is; //~ ERROR: variable does not need to be mutable - let mut b = 3is; //~ ERROR: variable does not need to be mutable - let mut a = vec!(3is); //~ ERROR: variable does not need to be mutable - let (mut a, b) = (1is, 2is); //~ ERROR: variable does not need to be mutable + 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 - match 30is { + match 30 { mut x => {} //~ ERROR: variable does not need to be mutable } - match (30is, 2is) { + match (30, 2) { (mut x, 1) | //~ ERROR: variable does not need to be mutable (mut x, 2) | (mut x, 3) => { @@ -35,28 +35,28 @@ fn main() { _ => {} } - let x = |&: mut y: isize| 10is; //~ ERROR: variable does not need to be mutable + let x = |&: mut y: isize| 10; //~ ERROR: variable does not need to be mutable fn what(mut foo: isize) {} //~ ERROR: variable does not need to be mutable // positive cases - let mut a = 2is; - a = 3is; + let mut a = 2; + a = 3; let mut a = Vec::new(); - a.push(3is); + a.push(3); let mut a = Vec::new(); callback(|| { - a.push(3is); + a.push(3); }); - let (mut a, b) = (1is, 2is); + let (mut a, b) = (1, 2); a = 34; - match 30is { + match 30 { mut x => { - x = 21is; + x = 21; } } - match (30is, 2is) { + match (30, 2) { (mut x, 1) | (mut x, 2) | (mut x, 3) => { @@ -65,12 +65,12 @@ fn main() { _ => {} } - let x = |&mut: mut y: isize| y = 32is; - fn nothing(mut foo: isize) { foo = 37is; } + let x = |&mut: mut y: isize| y = 32; + fn nothing(mut foo: isize) { foo = 37; } // leading underscore should avoid the warning, just like the // unused variable lint. - let mut _allowed = 1is; + let mut _allowed = 1; } fn callback(f: F) where F: FnOnce() {} @@ -78,6 +78,6 @@ fn callback(f: F) where F: FnOnce() {} // make sure the lint attribute can be turned off #[allow(unused_mut)] fn foo(mut a: isize) { - let mut a = 3is; - let mut b = vec!(2is); + let mut a = 3; + let mut b = vec!(2); } diff --git a/src/test/compile-fail/liveness-bad-bang-2.rs b/src/test/compile-fail/liveness-bad-bang-2.rs index bb0491755942e..181ba124fdd1d 100644 --- a/src/test/compile-fail/liveness-bad-bang-2.rs +++ b/src/test/compile-fail/liveness-bad-bang-2.rs @@ -11,7 +11,7 @@ // Tests that a function with a ! annotation always actually fails fn bad_bang(i: usize) -> ! { //~ ERROR computation may converge in a function marked as diverging - println!("{}", 3is); + println!("{}", 3); } fn main() { bad_bang(5us); } diff --git a/src/test/compile-fail/liveness-return-last-stmt-semi.rs b/src/test/compile-fail/liveness-return-last-stmt-semi.rs index 4b8f84ae70486..57252dd58d714 100644 --- a/src/test/compile-fail/liveness-return-last-stmt-semi.rs +++ b/src/test/compile-fail/liveness-return-last-stmt-semi.rs @@ -10,11 +10,11 @@ // // regression test for #8005 -macro_rules! test { () => { fn foo() -> isize { 1is; } } } - //~^ ERROR not all control paths return a value - //~^^ HELP consider removing this semicolon +macro_rules! test { () => { fn foo() -> i32 { 1i32; } } } + //~^ ERROR not all control paths return a value + //~^^ HELP consider removing this semicolon -fn no_return() -> isize {} //~ ERROR not all control paths return a value +fn no_return() -> i32 {} //~ ERROR not all control paths return a value fn bar(x: u32) -> u32 { //~ ERROR not all control paths return a value x * 2; //~ HELP consider removing this semicolon diff --git a/src/test/compile-fail/liveness-unused.rs b/src/test/compile-fail/liveness-unused.rs index ebcf46f7277d6..60c4c246552f4 100644 --- a/src/test/compile-fail/liveness-unused.rs +++ b/src/test/compile-fail/liveness-unused.rs @@ -31,40 +31,40 @@ fn f1d() { } fn f2() { - let x = 3is; + let x = 3; //~^ ERROR unused variable: `x` } fn f3() { - let mut x = 3is; + let mut x = 3; //~^ ERROR variable `x` is assigned to, but never used - x += 4is; + x += 4; //~^ ERROR value assigned to `x` is never read } fn f3b() { - let mut z = 3is; + let mut z = 3; //~^ ERROR variable `z` is assigned to, but never used loop { - z += 4is; + z += 4; } } #[allow(unused_variables)] fn f3c() { - let mut z = 3is; - loop { z += 4is; } + let mut z = 3; + loop { z += 4; } } #[allow(unused_variables)] #[allow(unused_assignments)] fn f3d() { - let mut x = 3is; - x += 4is; + let mut x = 3; + x += 4; } fn f4() { - match Some(3is) { + match Some(3) { Some(i) => { //~^ ERROR unused variable: `i` } @@ -77,7 +77,7 @@ enum tri { } fn f4b() -> isize { - match tri::a(3is) { + match tri::a(3) { tri::a(i) | tri::b(i) | tri::c(i) => { i } @@ -85,17 +85,17 @@ fn f4b() -> isize { } fn f5a() { - for x in 1is..10 { } + for x in 1..10 { } //~^ ERROR unused variable: `x` } fn f5b() { - for (x, _) in [1is, 2, 3].iter().enumerate() { } + for (x, _) in [1, 2, 3].iter().enumerate() { } //~^ ERROR unused variable: `x` } fn f5c() { - for (_, x) in [1is, 2, 3].iter().enumerate() { + for (_, x) in [1, 2, 3].iter().enumerate() { //~^ ERROR unused variable: `x` continue; std::os::set_exit_status(*x); //~ WARNING unreachable statement diff --git a/src/test/compile-fail/liveness-use-after-move.rs b/src/test/compile-fail/liveness-use-after-move.rs index 21e52f130609d..985eb1cd7babc 100644 --- a/src/test/compile-fail/liveness-use-after-move.rs +++ b/src/test/compile-fail/liveness-use-after-move.rs @@ -11,7 +11,7 @@ #![feature(box_syntax)] fn main() { - let x = box 5is; + let x = box 5; let y = x; println!("{}", *x); //~ ERROR use of moved value: `*x` y.clone(); diff --git a/src/test/compile-fail/loop-does-not-diverge.rs b/src/test/compile-fail/loop-does-not-diverge.rs index e2d3d059ad815..12de4a714efc5 100644 --- a/src/test/compile-fail/loop-does-not-diverge.rs +++ b/src/test/compile-fail/loop-does-not-diverge.rs @@ -14,7 +14,7 @@ fn forever() -> ! { loop { break; } - return 42is; //~ ERROR `return` in a function declared as diverging + return 42; //~ ERROR `return` in a function declared as diverging } fn main() { diff --git a/src/test/compile-fail/match-ill-type2.rs b/src/test/compile-fail/match-ill-type2.rs index 6b6954101b246..aa47ea670fd70 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 1is { - 1is => 1is, - 2us => 1is, //~ ERROR mismatched types - _ => 2is, + match 1i32 { + 1i32 => 1, + 2u32 => 1, //~ ERROR mismatched types + _ => 2, }; } diff --git a/src/test/compile-fail/match-non-exhaustive.rs b/src/test/compile-fail/match-non-exhaustive.rs index 2aeccacb0f6ee..a24d2ed4b7fba 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 0is { 1is => () } //~ ERROR non-exhaustive patterns - match 0is { 0is if false => () } //~ ERROR non-exhaustive patterns + match 0 { 1 => () } //~ ERROR non-exhaustive patterns + match 0 { 0 if false => () } //~ ERROR non-exhaustive patterns } diff --git a/src/test/compile-fail/match-vec-fixed.rs b/src/test/compile-fail/match-vec-fixed.rs index c35dc8d7c86eb..e778dd18e68d3 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 = [1is, 2, 3]; + let v = [1, 2, 3]; match v { [_, _, _] => {} [_, _, _] => {} //~ ERROR unreachable pattern diff --git a/src/test/compile-fail/method-missing-call.rs b/src/test/compile-fail/method-missing-call.rs index 899c1ef16a665..6616dcc8e1b03 100644 --- a/src/test/compile-fail/method-missing-call.rs +++ b/src/test/compile-fail/method-missing-call.rs @@ -33,7 +33,7 @@ fn main() { //~^ HELP maybe a `()` to call it is missing // Ensure the span is useful - let ys = &[1is,2,3,4,5,6,7]; + let ys = &[1,2,3,4,5,6,7]; let a = ys.iter() .map(|x| x) .filter(|&&x| x == 1) diff --git a/src/test/compile-fail/method-self-arg-1.rs b/src/test/compile-fail/method-self-arg-1.rs index 98b9e453889c1..7b6868af805e5 100644 --- a/src/test/compile-fail/method-self-arg-1.rs +++ b/src/test/compile-fail/method-self-arg-1.rs @@ -23,9 +23,9 @@ fn main() { //~| found `Foo` //~| expected &-ptr //~| found struct `Foo` - Foo::bar(&42is); //~ ERROR mismatched types - //~| expected `&Foo` - //~| found `&isize` - //~| expected struct `Foo` - //~| found isize + Foo::bar(&42i32); //~ ERROR mismatched types + //~| expected `&Foo` + //~| found `&i32` + //~| expected struct `Foo` + //~| found i32 } diff --git a/src/test/compile-fail/move-out-of-tuple-field.rs b/src/test/compile-fail/move-out-of-tuple-field.rs index ace6c80e3e3ee..7e3a85569d413 100644 --- a/src/test/compile-fail/move-out-of-tuple-field.rs +++ b/src/test/compile-fail/move-out-of-tuple-field.rs @@ -13,11 +13,11 @@ struct Foo(Box); fn main() { - let x = (box 1is,); + let x = (box 1,); let y = x.0; let z = x.0; //~ ERROR use of moved value: `x.0` - let x = Foo(box 1is); + let x = Foo(box 1); let y = x.0; let z = x.0; //~ ERROR use of moved value: `x.0` } diff --git a/src/test/compile-fail/moves-based-on-type-exprs.rs b/src/test/compile-fail/moves-based-on-type-exprs.rs index 58f1f78fa5d6d..c9f73e86a2c46 100644 --- a/src/test/compile-fail/moves-based-on-type-exprs.rs +++ b/src/test/compile-fail/moves-based-on-type-exprs.rs @@ -24,13 +24,13 @@ fn f10() { fn f20() { let x = "hi".to_string(); - let _y = (x, 3is); + let _y = (x, 3); touch(&x); //~ ERROR use of moved value: `x` } fn f21() { - let x = vec!(1is, 2, 3); - let _y = (x[0], 3is); + let x = vec!(1, 2, 3); + let _y = (x[0], 3); touch(&x); } @@ -61,9 +61,9 @@ fn f50(cond: bool) { let x = "hi".to_string(); let y = "ho".to_string(); let _y = match cond { - _ if guard(x) => 10is, - true => 10is, - false => 20is, + _ if guard(x) => 10, + true => 10, + false => 20, }; 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 847a3eaf8a1e7..99d7258477ace 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(0is); + let m = RefCell::new(0); let mut b = m.borrow_mut(); let b1 = &mut *b; let b2 = &mut *b; //~ ERROR cannot borrow diff --git a/src/test/compile-fail/mut-cross-borrowing.rs b/src/test/compile-fail/mut-cross-borrowing.rs index 7fb5c2ac4a4ff..2cf6e67a90958 100644 --- a/src/test/compile-fail/mut-cross-borrowing.rs +++ b/src/test/compile-fail/mut-cross-borrowing.rs @@ -13,7 +13,7 @@ fn f(_: &mut isize) {} fn main() { - let mut x = box 3is; + let mut x = box 3; f(x) //~ ERROR mismatched types } diff --git a/src/test/compile-fail/mut-not-freeze.rs b/src/test/compile-fail/mut-not-freeze.rs index 8c39320276a16..2269c58c97de3 100644 --- a/src/test/compile-fail/mut-not-freeze.rs +++ b/src/test/compile-fail/mut-not-freeze.rs @@ -13,7 +13,7 @@ use std::cell::RefCell; fn f(_: T) {} fn main() { - let x = RefCell::new(0is); + let x = RefCell::new(0); f(x); //~^ ERROR `core::marker::Sync` is not implemented //~^^ ERROR `core::marker::Sync` is not implemented diff --git a/src/test/compile-fail/mut-pattern-internal-mutability.rs b/src/test/compile-fail/mut-pattern-internal-mutability.rs index 92f02114a1360..b0d618328dcca 100644 --- a/src/test/compile-fail/mut-pattern-internal-mutability.rs +++ b/src/test/compile-fail/mut-pattern-internal-mutability.rs @@ -9,7 +9,7 @@ // except according to those terms. fn main() { - let foo = &mut 1is; + let foo = &mut 1; let &mut x = foo; x += 1; //~ ERROR re-assignment of immutable variable diff --git a/src/test/compile-fail/mut-pattern-mismatched.rs b/src/test/compile-fail/mut-pattern-mismatched.rs index a3d016d756ffc..6de69a9adb0c9 100644 --- a/src/test/compile-fail/mut-pattern-mismatched.rs +++ b/src/test/compile-fail/mut-pattern-mismatched.rs @@ -9,21 +9,21 @@ // except according to those terms. fn main() { - let foo = &mut 1is; + let foo = &mut 1i32; // (separate lines to ensure the spans are accurate) let &_ //~ ERROR mismatched types - //~| expected `&mut isize` + //~| expected `&mut i32` //~| found `&_` //~| values differ in mutability = foo; let &mut _ = foo; - let bar = &1is; + let bar = &1i32; let &_ = bar; let &mut _ //~ ERROR mismatched types - //~| expected `&isize` + //~| expected `&i32` //~| found `&mut _` //~| values differ in mutability = bar; 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 74b561c37aacb..8e968d90a2f65 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(0is); + let m = RefCell::new(0); let p; { let b = m.borrow(); diff --git a/src/test/compile-fail/no-capture-arc.rs b/src/test/compile-fail/no-capture-arc.rs index beb0d0ee47e2f..939d7c7a5348b 100644 --- a/src/test/compile-fail/no-capture-arc.rs +++ b/src/test/compile-fail/no-capture-arc.rs @@ -14,7 +14,7 @@ use std::sync::Arc; use std::thread::Thread; fn main() { - let v = vec!(1is, 2, 3, 4, 5, 6, 7, 8, 9, 10); + let v = vec!(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); let arc_v = Arc::new(v); Thread::spawn(move|| { diff --git a/src/test/compile-fail/no-reuse-move-arc.rs b/src/test/compile-fail/no-reuse-move-arc.rs index d8f0fa497a4f3..730ba9ab9ea71 100644 --- a/src/test/compile-fail/no-reuse-move-arc.rs +++ b/src/test/compile-fail/no-reuse-move-arc.rs @@ -12,7 +12,7 @@ use std::sync::Arc; use std::thread::Thread; fn main() { - let v = vec!(1is, 2, 3, 4, 5, 6, 7, 8, 9, 10); + let v = vec!(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); let arc_v = Arc::new(v); Thread::spawn(move|| { diff --git a/src/test/compile-fail/no_send-rc.rs b/src/test/compile-fail/no_send-rc.rs index d404988bd9848..b5c572b17dd9a 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) {} fn main() { - let x = Rc::new(5is); + let x = Rc::new(5); bar(x); //~^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/no_share-rc.rs b/src/test/compile-fail/no_share-rc.rs index 4917db602e175..4bc3442871f5d 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) {} fn main() { - let x = Rc::new(RefCell::new(5is)); + let x = Rc::new(RefCell::new(5)); bar(x); //~^ ERROR the trait `core::marker::Sync` is not implemented } diff --git a/src/test/compile-fail/non-exhaustive-match.rs b/src/test/compile-fail/non-exhaustive-match.rs index ccf69a4d2c8b1..fce72f507b6fc 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(10is) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered + match Some(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered None => {} } - match (2is, 3is, 4is) { //~ ERROR non-exhaustive patterns: `(_, _, _)` not covered + match (2, 3, 4) { //~ ERROR non-exhaustive patterns: `(_, _, _)` not covered (_, _, 4) => {} } match (t::a, t::a) { //~ ERROR non-exhaustive patterns: `(a, a)` not covered @@ -35,14 +35,14 @@ fn main() { (_, t::a) => {} (t::b, t::b) => {} } - let vec = vec!(Some(42is), None, Some(21is)); + let vec = vec!(Some(42), None, Some(21)); let vec: &[Option] = vec.as_slice(); match vec { //~ ERROR non-exhaustive patterns: `[]` not covered [Some(..), None, tail..] => {} [Some(..), Some(..), tail..] => {} [None] => {} } - let vec = vec!(1is); + let vec = vec!(1); let vec: &[isize] = vec.as_slice(); match vec { [_, tail..] => (), @@ -56,7 +56,7 @@ fn main() { [0.1] => (), [] => () } - let vec = vec!(Some(42is), None, Some(21is)); + let vec = vec!(Some(42), None, Some(21)); let vec: &[Option] = vec.as_slice(); match vec { [Some(..), None, tail..] => {} diff --git a/src/test/compile-fail/pat-range-bad-dots.rs b/src/test/compile-fail/pat-range-bad-dots.rs index 7f67d7a5fb19e..b48d3e8871b20 100644 --- a/src/test/compile-fail/pat-range-bad-dots.rs +++ b/src/test/compile-fail/pat-range-bad-dots.rs @@ -9,7 +9,7 @@ // except according to those terms. pub fn main() { - match 22is { + match 22 { 0 .. 3 => {} //~ ERROR expected one of `...`, `=>`, or `|`, found `..` _ => {} } diff --git a/src/test/compile-fail/pattern-bindings-after-at.rs b/src/test/compile-fail/pattern-bindings-after-at.rs index 70840200aad7d..80544099329cf 100644 --- a/src/test/compile-fail/pattern-bindings-after-at.rs +++ b/src/test/compile-fail/pattern-bindings-after-at.rs @@ -14,7 +14,7 @@ enum Option { } fn main() { - match &mut Some(1is) { + match &mut Some(1) { ref mut z @ &mut Some(ref a) => { //~^ ERROR pattern bindings are not allowed after an `@` **z = None; diff --git a/src/test/compile-fail/pptypedef.rs b/src/test/compile-fail/pptypedef.rs index 9e5081ed55028..ccf82e90b7a1d 100644 --- a/src/test/compile-fail/pptypedef.rs +++ b/src/test/compile-fail/pptypedef.rs @@ -11,17 +11,17 @@ fn let_in(x: T, f: F) where F: FnOnce(T) {} fn main() { - let_in(3us, |i| { assert!(i == 3is); }); + let_in(3u32, |i| { assert!(i == 3i32); }); //~^ ERROR mismatched types - //~| expected `usize` - //~| found `isize` - //~| expected usize - //~| found isize + //~| expected `u32` + //~| found `i32` + //~| expected u32 + //~| found i32 - let_in(3is, |i| { assert!(i == 3us); }); + let_in(3i32, |i| { assert!(i == 3u32); }); //~^ ERROR mismatched types - //~| expected `isize` - //~| found `usize` - //~| expected isize - //~| found usize + //~| expected `i32` + //~| found `u32` + //~| expected i32 + //~| found u32 } diff --git a/src/test/compile-fail/ptr-coercion.rs b/src/test/compile-fail/ptr-coercion.rs index 463754b29c7b4..18e210076cb55 100644 --- a/src/test/compile-fail/ptr-coercion.rs +++ b/src/test/compile-fail/ptr-coercion.rs @@ -13,7 +13,7 @@ pub fn main() { // *const -> *mut - let x: *const isize = &42is; + let x: *const isize = &42; let x: *mut isize = x; //~ ERROR mismatched types //~| expected `*mut isize` //~| found `*const isize` diff --git a/src/test/compile-fail/range-1.rs b/src/test/compile-fail/range-1.rs index fbc9ad99b7243..67b203bec197c 100644 --- a/src/test/compile-fail/range-1.rs +++ b/src/test/compile-fail/range-1.rs @@ -12,7 +12,7 @@ pub fn main() { // Mixed types. - let _ = 0us..10is; + let _ = 0u32..10i32; //~^ ERROR start and end of range have incompatible types // Float => does not implement iterator. @@ -23,7 +23,7 @@ pub fn main() { // FIXME(#21528) not fulfilled obligation error should be reported once, not thrice // Unsized type. - let arr: &[_] = &[1us, 2, 3]; + let arr: &[_] = &[1u32, 2, 3]; let range = *arr..; //~^ ERROR the trait `core::marker::Sized` is not implemented } diff --git a/src/test/compile-fail/range-2.rs b/src/test/compile-fail/range-2.rs index 9d89f4b05c5b9..c9053328572bc 100644 --- a/src/test/compile-fail/range-2.rs +++ b/src/test/compile-fail/range-2.rs @@ -12,7 +12,7 @@ pub fn main() { let r = { - &42is..&42 + &42..&42 //~^ ERROR borrowed value does not live long enough //~^^ ERROR borrowed value does not live long enough }; diff --git a/src/test/compile-fail/refutable-pattern-errors.rs b/src/test/compile-fail/refutable-pattern-errors.rs index d06c73c4cc039..ce93e1875ae5a 100644 --- a/src/test/compile-fail/refutable-pattern-errors.rs +++ b/src/test/compile-fail/refutable-pattern-errors.rs @@ -13,6 +13,6 @@ fn func((1, (Some(1), 2...3)): (isize, (Option, isize))) { } //~^ ERROR refutable pattern in function argument: `(_, _)` not covered fn main() { - let (1is, (Some(1is), 2is...3is)) = (1is, (None, 2is)); + let (1, (Some(1), 2...3)) = (1, (None, 2)); //~^ ERROR refutable pattern in local binding: `(_, _)` not covered } diff --git a/src/test/compile-fail/regions-close-over-type-parameter-2.rs b/src/test/compile-fail/regions-close-over-type-parameter-2.rs index 543d4d1620b79..053af49e0684b 100644 --- a/src/test/compile-fail/regions-close-over-type-parameter-2.rs +++ b/src/test/compile-fail/regions-close-over-type-parameter-2.rs @@ -29,7 +29,7 @@ fn main() { // ~Repeat<&'blk isize> where blk is the lifetime of the block below. let _ = { - let tmp0 = 3is; + let tmp0 = 3; let tmp1 = &tmp0; //~ ERROR `tmp0` does not live long enough repeater3(tmp1) }; 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 c300c86f70fca..f588655d1afa8 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 = 3is; + let x = 3; // 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 = 1is + *p; + let x = 1 + *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 5e6e1858cf1c1..89350f1616760 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 = 3is; + let mut x = 3; let mut _y = vec!(&mut x); while x < 10 { //~ ERROR cannot use `x` because it was mutably borrowed let mut z = x; //~ ERROR cannot use `x` because it was mutably borrowed diff --git a/src/test/compile-fail/regions-infer-proc-static-upvar.rs b/src/test/compile-fail/regions-infer-proc-static-upvar.rs index 4e99f64dbf7b3..ee5d5cad0a3fd 100644 --- a/src/test/compile-fail/regions-infer-proc-static-upvar.rs +++ b/src/test/compile-fail/regions-infer-proc-static-upvar.rs @@ -16,7 +16,7 @@ fn foo(_p: F) { } static i: isize = 3; fn capture_local() { - let x = 3is; + let x = 3; let y = &x; //~ ERROR `x` does not live long enough foo(move|| { let _a = *y; diff --git a/src/test/compile-fail/regions-steal-closure.rs b/src/test/compile-fail/regions-steal-closure.rs index 583d9695be4cf..97b51fdb32508 100644 --- a/src/test/compile-fail/regions-steal-closure.rs +++ b/src/test/compile-fail/regions-steal-closure.rs @@ -21,7 +21,7 @@ fn box_it<'r>(x: Box) -> closure_box<'r> { fn main() { let cl_box = { - let mut i = 3is; + let mut i = 3; box_it(box || i += 1) //~ ERROR cannot infer }; cl_box.cl.call_mut(()); diff --git a/src/test/compile-fail/regions-var-type-out-of-scope.rs b/src/test/compile-fail/regions-var-type-out-of-scope.rs index 039de994ea32d..8955a26de0b93 100644 --- a/src/test/compile-fail/regions-var-type-out-of-scope.rs +++ b/src/test/compile-fail/regions-var-type-out-of-scope.rs @@ -14,8 +14,8 @@ fn foo(cond: bool) { let mut x; if cond { - x = &3is; //~ ERROR borrowed value does not live long enough - assert_eq!(*x, 3is); + x = &3; //~ ERROR borrowed value does not live long enough + assert_eq!(*x, 3); } } diff --git a/src/test/compile-fail/static-assert2.rs b/src/test/compile-fail/static-assert2.rs index e988cfb9097ea..d5e70205e9536 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 = 1is == 2; //~ ERROR static assertion failed +static E: bool = 1 == 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 bfdeff6ed7083..76fecea0c3a6a 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 4is { + match 4 { a => {} //~ ERROR static variables cannot be referenced in a pattern _ => {} } diff --git a/src/test/compile-fail/static-region-bound.rs b/src/test/compile-fail/static-region-bound.rs index 4c59e7a769fbf..200aa9891935a 100644 --- a/src/test/compile-fail/static-region-bound.rs +++ b/src/test/compile-fail/static-region-bound.rs @@ -13,8 +13,8 @@ fn f(_: T) {} fn main() { - let x = box 3is; + let x = box 3; f(x); - let x = &3is; //~ ERROR borrowed value does not live long enough + let x = &3; //~ ERROR borrowed value does not live long enough f(x); } diff --git a/src/test/compile-fail/structure-constructor-type-mismatch.rs b/src/test/compile-fail/structure-constructor-type-mismatch.rs index a22f390499f27..a82c05c72c303 100644 --- a/src/test/compile-fail/structure-constructor-type-mismatch.rs +++ b/src/test/compile-fail/structure-constructor-type-mismatch.rs @@ -26,39 +26,39 @@ fn main() { let pt = PointF { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found isize - x: 1is, - y: 2is, + //~| found i32 + x: 1i32, + y: 2i32, }; let pt2 = Point:: { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found isize - x: 3is, - y: 4is, + //~| found i32 + x: 3i32, + y: 4i32, }; let pair = PairF { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found isize - x: 5is, - y: 6is, + //~| found i32 + x: 5i32, + y: 6i32, }; - let pair2 = PairF:: { + let pair2 = PairF:: { //~^ ERROR structure constructor specifies a structure of type //~| expected f32 - //~| found isize - x: 7is, - y: 8is, + //~| found i32 + x: 7i32, + y: 8i32, }; - let pt3 = PointF:: { + let pt3 = PointF:: { //~^ ERROR wrong number of type arguments - x: 9is, - y: 10is, + x: 9i32, + y: 10i32, }; } diff --git a/src/test/compile-fail/trailing-plus-in-bounds.rs b/src/test/compile-fail/trailing-plus-in-bounds.rs index 069c2e88793da..e8f9ed4d2cfc8 100644 --- a/src/test/compile-fail/trailing-plus-in-bounds.rs +++ b/src/test/compile-fail/trailing-plus-in-bounds.rs @@ -11,7 +11,7 @@ use std::fmt::Show; fn main() { - let x: Box = box 3is as Box; + let x: Box = box 3 as Box; //~^ ERROR at least one type parameter bound must be specified //~^^ ERROR at least one type parameter bound must be specified } diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs index 45a74a235e0e2..118dfeb37c251 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-locals.rs @@ -17,7 +17,7 @@ struct Foo { fn main() { let foo = Foo { //~^ ERROR not implemented - x: 3is + x: 3 }; let baz: Foo = panic!(); diff --git a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs index 6179301c11da1..8a9732de7fbd7 100644 --- a/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs +++ b/src/test/compile-fail/trait-bounds-on-structs-and-enums-xc1.rs @@ -17,7 +17,7 @@ use trait_bounds_on_structs_and_enums_xc::{Bar, Foo, Trait}; fn main() { let foo = Foo { //~^ ERROR not implemented - x: 3is + x: 3 }; let bar: Bar = return; //~^ ERROR not implemented diff --git a/src/test/compile-fail/trait-impl-1.rs b/src/test/compile-fail/trait-impl-1.rs index 1c7fa1e426397..dadcbd5bce710 100644 --- a/src/test/compile-fail/trait-impl-1.rs +++ b/src/test/compile-fail/trait-impl-1.rs @@ -18,9 +18,9 @@ impl<'a> T+'a { fn foo(&self) {} } -impl T for isize {} +impl T for i32 {} fn main() { - let x = &42is; - x.foo(); //~ERROR: type `&isize` does not implement any method in scope named `foo` + let x = &42i32; + x.foo(); //~ERROR: type `&i32` does not implement any method in scope named `foo` } diff --git a/src/test/compile-fail/trait-test-2.rs b/src/test/compile-fail/trait-test-2.rs index bdfc6dcda8837..d8b3176787c04 100644 --- a/src/test/compile-fail/trait-test-2.rs +++ b/src/test/compile-fail/trait-test-2.rs @@ -11,11 +11,11 @@ #![feature(box_syntax)] trait bar { fn dup(&self) -> Self; fn blah(&self); } -impl bar for isize { fn dup(&self) -> isize { *self } fn blah(&self) {} } -impl bar for usize { fn dup(&self) -> usize { *self } fn blah(&self) {} } +impl bar for i32 { fn dup(&self) -> i32 { *self } fn blah(&self) {} } +impl bar for u32 { fn dup(&self) -> u32 { *self } fn blah(&self) {} } fn main() { - 10is.dup::(); //~ ERROR does not take type parameters - 10is.blah::(); //~ ERROR incorrect number of type parameters - (box 10is as Box).dup(); //~ ERROR cannot convert to a trait object + 10.dup::(); //~ ERROR does not take type parameters + 10.blah::(); //~ ERROR incorrect number of type parameters + (box 10 as Box).dup(); //~ ERROR cannot convert to a trait object } diff --git a/src/test/compile-fail/traits-multidispatch-bad.rs b/src/test/compile-fail/traits-multidispatch-bad.rs index 2e29a61846eda..392eccf0f31a3 100644 --- a/src/test/compile-fail/traits-multidispatch-bad.rs +++ b/src/test/compile-fail/traits-multidispatch-bad.rs @@ -14,9 +14,9 @@ trait Convert { fn convert(&self) -> Target; } -impl Convert for isize { - fn convert(&self) -> usize { - *self as usize +impl Convert for i32 { + fn convert(&self) -> u32 { + *self as u32 } } @@ -26,7 +26,7 @@ where T : Convert } fn a() { - test(22is, 44is); //~ ERROR mismatched types + test(22i32, 44i32); //~ ERROR mismatched types } fn main() {} diff --git a/src/test/compile-fail/tuple-index-out-of-bounds.rs b/src/test/compile-fail/tuple-index-out-of-bounds.rs index 20dd71e3bdf44..54b8d551f202e 100644 --- a/src/test/compile-fail/tuple-index-out-of-bounds.rs +++ b/src/test/compile-fail/tuple-index-out-of-bounds.rs @@ -8,17 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -struct Point(isize, isize); +struct Point(i32, i32); fn main() { - let origin = Point(0, 0); + let origin = Point(0i32, 0i32); origin.0; origin.1; origin.2; //~^ ERROR attempted out-of-bounds tuple index `2` on type `Point` - let tuple = (0is, 0is); + let tuple = (0i32, 0i32); tuple.0; tuple.1; tuple.2; - //~^ ERROR attempted out-of-bounds tuple index `2` on type `(isize, isize)` + //~^ ERROR attempted out-of-bounds tuple index `2` on type `(i32, i32)` } diff --git a/src/test/compile-fail/tutorial-suffix-inference-test.rs b/src/test/compile-fail/tutorial-suffix-inference-test.rs index c8c596fdb4fcc..bb1e199920d5c 100644 --- a/src/test/compile-fail/tutorial-suffix-inference-test.rs +++ b/src/test/compile-fail/tutorial-suffix-inference-test.rs @@ -29,7 +29,7 @@ fn main() { //~| expected u16 //~| found i32 - let a = 3is; + let a = 3; fn identity_i(n: isize) -> isize { n } diff --git a/src/test/compile-fail/type-mismatch-multiple.rs b/src/test/compile-fail/type-mismatch-multiple.rs index 4ab6bd531913a..3bf0896d990af 100644 --- a/src/test/compile-fail/type-mismatch-multiple.rs +++ b/src/test/compile-fail/type-mismatch-multiple.rs @@ -10,14 +10,14 @@ // Checking that the compiler reports multiple type errors at once -fn main() { let a: bool = 1is; let b: isize = true; } +fn main() { let a: bool = 1i32; let b: i32 = true; } //~^ ERROR mismatched types //~| expected `bool` -//~| found `isize` +//~| found `i32` //~| expected bool -//~| found isize +//~| found i32 //~| ERROR mismatched types -//~| expected `isize` +//~| expected `i32` //~| found `bool` -//~| expected isize +//~| expected i32 //~| found bool diff --git a/src/test/compile-fail/typeck-unsafe-always-share.rs b/src/test/compile-fail/typeck-unsafe-always-share.rs index 38e3b57634838..1cb6bd048ccc3 100644 --- a/src/test/compile-fail/typeck-unsafe-always-share.rs +++ b/src/test/compile-fail/typeck-unsafe-always-share.rs @@ -25,7 +25,7 @@ impl !Sync for NoSync {} fn test(s: T) {} fn main() { - let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0is)}); + let us = UnsafeCell::new(MySync{u: UnsafeCell::new(0)}); test(us); //~^ ERROR `core::marker::Sync` is not implemented diff --git a/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs b/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs index 525d0b31995c2..ef6c439aeb89d 100644 --- a/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs +++ b/src/test/compile-fail/unboxed-closures-infer-argument-types-two-region-pointers.rs @@ -23,7 +23,7 @@ fn doit(val: T, f: &F) } pub fn main() { - doit(0is, &|&: x, y| { + doit(0, &|&: x, y| { x.set(y); //~ ERROR cannot infer }); } diff --git a/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs b/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs index 22bfabf040ae4..8d3721f28db50 100644 --- a/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs +++ b/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs @@ -12,6 +12,6 @@ fn main() { let mut_ = |&mut: x| x; - mut_.call((0is, )); //~ ERROR does not implement any method in scope named `call` + mut_.call((0, )); //~ ERROR does not implement any method in scope named `call` } diff --git a/src/test/compile-fail/unique-unique-kind.rs b/src/test/compile-fail/unique-unique-kind.rs index 322de45daf03e..d45a31abcb711 100644 --- a/src/test/compile-fail/unique-unique-kind.rs +++ b/src/test/compile-fail/unique-unique-kind.rs @@ -16,7 +16,7 @@ fn f(_i: T) { } fn main() { - let i = box Rc::new(100is); + let i = box Rc::new(100); f(i); //~^ ERROR `core::marker::Send` is not implemented } diff --git a/src/test/compile-fail/unreachable-code.rs b/src/test/compile-fail/unreachable-code.rs index d96578f2df94a..dd08eed5df91a 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 = 3is; //~ ERROR: unreachable statement + let a = 3; //~ ERROR: unreachable statement } diff --git a/src/test/compile-fail/unsized3.rs b/src/test/compile-fail/unsized3.rs index 9d4cfe0f4ac65..4fc76c99c60b7 100644 --- a/src/test/compile-fail/unsized3.rs +++ b/src/test/compile-fail/unsized3.rs @@ -55,12 +55,12 @@ fn f8(x1: &S, x2: &S) { // Test some tuples. fn f9(x1: Box>, x2: Box>) { - f5(&(*x1, 34is)); + f5(&(*x1, 34)); //~^ ERROR the trait `core::marker::Sized` is not implemented } fn f10(x1: Box>, x2: Box>) { - f5(&(32is, *x2)); + f5(&(32, *x2)); //~^ ERROR the trait `core::marker::Sized` is not implemented } diff --git a/src/test/compile-fail/unsized6.rs b/src/test/compile-fail/unsized6.rs index 21953d1bb09f9..217d1f44d8461 100644 --- a/src/test/compile-fail/unsized6.rs +++ b/src/test/compile-fail/unsized6.rs @@ -27,12 +27,12 @@ fn f2(x: &X) { fn f3(x1: Box, x2: Box, x3: Box) { let y: X = *x1; //~ERROR the trait `core::marker::Sized` is not implemented let y = *x2; //~ERROR the trait `core::marker::Sized` is not implemented - let (y, z) = (*x3, 4is); //~ERROR the trait `core::marker::Sized` is not implemented + let (y, z) = (*x3, 4); //~ERROR the trait `core::marker::Sized` is not implemented } fn f4(x1: Box, x2: Box, x3: Box) { let y: X = *x1; //~ERROR the trait `core::marker::Sized` is not implemented let y = *x2; //~ERROR the trait `core::marker::Sized` is not implemented - let (y, z) = (*x3, 4is); //~ERROR the trait `core::marker::Sized` is not implemented + let (y, z) = (*x3, 4); //~ERROR the trait `core::marker::Sized` is not implemented } fn g1(x: X) {} //~ERROR the trait `core::marker::Sized` is not implemented diff --git a/src/test/compile-fail/unused-mut-warning-captured-var.rs b/src/test/compile-fail/unused-mut-warning-captured-var.rs index aa5adb6a6b0cd..87ea56c055350 100644 --- a/src/test/compile-fail/unused-mut-warning-captured-var.rs +++ b/src/test/compile-fail/unused-mut-warning-captured-var.rs @@ -11,7 +11,7 @@ #![forbid(unused_mut)] fn main() { - let mut x = 1is; + let mut x = 1; //~^ ERROR: variable does not need to be mutable move|:| { println!("{}", x); }; } diff --git a/src/test/compile-fail/vec-mut-iter-borrow.rs b/src/test/compile-fail/vec-mut-iter-borrow.rs index 59c490f2fff27..7dcedc8ecadd1 100644 --- a/src/test/compile-fail/vec-mut-iter-borrow.rs +++ b/src/test/compile-fail/vec-mut-iter-borrow.rs @@ -12,6 +12,6 @@ fn main() { let mut xs: Vec = vec!(); for x in xs.iter_mut() { - xs.push(1is) //~ ERROR cannot borrow `xs` + xs.push(1) //~ ERROR cannot borrow `xs` } } diff --git a/src/test/compile-fail/vtable-res-trait-param.rs b/src/test/compile-fail/vtable-res-trait-param.rs index bbe88379aa737..c21d8274da069 100644 --- a/src/test/compile-fail/vtable-res-trait-param.rs +++ b/src/test/compile-fail/vtable-res-trait-param.rs @@ -28,6 +28,6 @@ fn call_it(b: B) -> isize { } fn main() { - let x = 3is; + let x = 3; assert_eq!(call_it(x), 22); } diff --git a/src/test/compile-fail/warn-path-statement.rs b/src/test/compile-fail/warn-path-statement.rs index d205e2a2e4e09..892d82d09345e 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-statements fn main() { - let x = 10is; + let x = 10; x; //~ ERROR path statement with no effect } diff --git a/src/test/compile-fail/where-clauses-not-parameter.rs b/src/test/compile-fail/where-clauses-not-parameter.rs index 5573464c5ab6c..313ae273c07fe 100644 --- a/src/test/compile-fail/where-clauses-not-parameter.rs +++ b/src/test/compile-fail/where-clauses-not-parameter.rs @@ -41,5 +41,5 @@ impl Baz for isize where isize : Eq { } fn main() { - equal(&0is, &0is); + equal(&0, &0); } diff --git a/src/test/compile-fail/while-let.rs b/src/test/compile-fail/while-let.rs index 45e0d0aaeab13..a70dcccd4e85e 100644 --- a/src/test/compile-fail/while-let.rs +++ b/src/test/compile-fail/while-let.rs @@ -20,16 +20,16 @@ fn macros() { }} } - foo!(a, 1is, { //~ ERROR irrefutable while-let + foo!(a, 1, { //~ ERROR irrefutable while-let println!("irrefutable pattern"); }); - bar!(a, 1is, { //~ ERROR irrefutable while-let + bar!(a, 1, { //~ ERROR irrefutable while-let println!("irrefutable pattern"); }); } pub fn main() { - while let a = 1is { //~ ERROR irrefutable while-let + while let a = 1 { //~ ERROR irrefutable while-let println!("irrefutable pattern"); } } diff --git a/src/test/pretty/issue-4264.pp b/src/test/pretty/issue-4264.pp index b1d38f5dc9b16..cc8337027b092 100644 --- a/src/test/pretty/issue-4264.pp +++ b/src/test/pretty/issue-4264.pp @@ -19,7 +19,7 @@ // #4264 fixed-length vector types -pub fn foo(_: [isize; (3 as usize)]) { } +pub fn foo(_: [i32; (3 as usize)]) { } pub fn bar() { const FOO: usize = ((5us as usize) - (4us as usize) as usize); @@ -28,9 +28,9 @@ let _: [(); (1us as usize)] = ([(() as ())] as [(); 1]); let _ = - (((&((([(1is as isize), (2 as isize), (3 as isize)] as [isize; 3])) as - [isize; 3]) as &[isize; 3]) as *const _ as *const [isize; 3]) - as *const [isize; (3us as usize)] as *const [isize; 3]); + (((&((([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])) as [i32; 3]) + as &[i32; 3]) as *const _ as *const [i32; 3]) as + *const [i32; (3us as usize)] as *const [i32; 3]); @@ -78,19 +78,18 @@ core::fmt::Arguments<'_>)) as collections::string::String); } -pub type Foo = [isize; (3us as usize)]; +pub type Foo = [i32; (3us as usize)]; pub struct Bar { - pub x: [isize; (3us as usize)], + pub x: [i32; (3us as usize)], } -pub struct TupleBar([isize; (4us as usize)]); -pub enum Baz { BazVariant([isize; (5us as usize)]), } +pub struct TupleBar([i32; (4us as usize)]); +pub enum Baz { BazVariant([i32; (5us as usize)]), } pub fn id(x: T) -> T { (x as T) } pub fn use_id() { let _ = - ((id::<[isize; (3us as usize)]> as - fn([isize; 3]) -> [isize; 3] {id})(([(1 as isize), (2 as isize), - (3 as isize)] as - [isize; 3])) as - [isize; 3]); + ((id::<[i32; (3us as usize)]> as + fn([i32; 3]) -> [i32; 3] {id})(([(1 as i32), (2 as i32), + (3 as i32)] as [i32; 3])) as + [i32; 3]); } fn main() { } diff --git a/src/test/pretty/issue-4264.rs b/src/test/pretty/issue-4264.rs index 75be2f23c2b20..ff30bc6c15780 100644 --- a/src/test/pretty/issue-4264.rs +++ b/src/test/pretty/issue-4264.rs @@ -14,7 +14,7 @@ // #4264 fixed-length vector types -pub fn foo(_: [isize; 3]) {} +pub fn foo(_: [i32; 3]) {} pub fn bar() { const FOO: usize = 5us - 4us; @@ -22,27 +22,27 @@ pub fn bar() { let _ : [(); 1us] = [()]; - let _ = &([1is,2,3]) as *const _ as *const [isize; 3us]; + let _ = &([1,2,3]) as *const _ as *const [i32; 3us]; format!("test"); } -pub type Foo = [isize; 3us]; +pub type Foo = [i32; 3us]; pub struct Bar { - pub x: [isize; 3us] + pub x: [i32; 3us] } -pub struct TupleBar([isize; 4us]); +pub struct TupleBar([i32; 4us]); pub enum Baz { - BazVariant([isize; 5us]) + BazVariant([i32; 5us]) } pub fn id(x: T) -> T { x } pub fn use_id() { - let _ = id::<[isize; 3us]>([1,2,3]); + let _ = id::<[i32; 3us]>([1,2,3]); } diff --git a/src/test/run-fail/assert-as-macro.rs b/src/test/run-fail/assert-as-macro.rs index 59e79fe9266f0..c52c11b1b9188 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: 1is == 2 +// error-pattern:assertion failed: 1 == 2 fn main() { - assert!(1is == 2); + assert!(1 == 2); } diff --git a/src/test/run-fail/panic.rs b/src/test/run-fail/panic.rs index dd4c58f176c84..7c6473ebfc26d 100644 --- a/src/test/run-fail/panic.rs +++ b/src/test/run-fail/panic.rs @@ -8,5 +8,5 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:1is == 2 -fn main() { assert!((1is == 2)); } +// error-pattern:1 == 2 +fn main() { assert!((1 == 2)); } 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 694a06ed83a6f..d924890b3118c 100644 --- a/src/test/run-make/graphviz-flowgraph/f01.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f01.dot-expected.dot @@ -1,9 +1,9 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 1is"]; - N3[label="stmt 1is;"]; - N4[label="block { 1is; }"]; + N2[label="expr 1"]; + N3[label="stmt 1;"]; + N4[label="block { 1; }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f01.rs b/src/test/run-make/graphviz-flowgraph/f01.rs index 27b198078651a..231aab69e50d9 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() { - 1is; + 1; } 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 efa2c6404a25f..8b6500761850f 100644 --- a/src/test/run-make/graphviz-flowgraph/f03.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f03.dot-expected.dot @@ -1,11 +1,11 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 3is"]; + N2[label="expr 3"]; N3[label="expr 4"]; - N4[label="expr 3is + 4"]; - N5[label="stmt 3is + 4;"]; - N6[label="block { 3is + 4; }"]; + N4[label="expr 3 + 4"]; + N5[label="stmt 3 + 4;"]; + N6[label="block { 3 + 4; }"]; 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 c95dbcbb31c2e..2dd71b623c24d 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() { - 3is + 4; + 3 + 4; } 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 1f375b767ce49..fde6cc2900550 100644 --- a/src/test/run-make/graphviz-flowgraph/f04.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f04.dot-expected.dot @@ -1,10 +1,10 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 4is"]; + N2[label="expr 4"]; N3[label="local _x"]; - N4[label="stmt let _x = 4is;"]; - N5[label="block { let _x = 4is; }"]; + N4[label="stmt let _x = 4;"]; + N5[label="block { let _x = 4; }"]; 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 552cb24c7506e..2a0ac8ac9e570 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 = 4is; + let _x = 4; } 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 8c9a930098aa6..efd56cd0c75e4 100644 --- a/src/test/run-make/graphviz-flowgraph/f05.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f05.dot-expected.dot @@ -1,14 +1,14 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 5is"]; - N3[label="expr 55is"]; - N4[label="expr (5is, 55is)"]; + N2[label="expr 5"]; + N3[label="expr 55"]; + N4[label="expr (5, 55)"]; N5[label="local _x"]; N6[label="local _y"]; N7[label="pat (_x, _y)"]; - N8[label="stmt let (_x, _y) = (5is, 55is);"]; - N9[label="block { let (_x, _y) = (5is, 55is); }"]; + N8[label="stmt let (_x, _y) = (5, 55);"]; + N9[label="block { let (_x, _y) = (5, 55); }"]; 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 09a45c9bd2151..616d822bed07b 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) = (5is, 55is); + let (_x, _y) = (5, 55); } 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 da7d5759b7ede..bee4a120d5909 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 7is"]; - N3[label="expr 77is"]; - N4[label="expr 777is"]; - N5[label="expr 7777is"]; - N6[label="expr [7is, 77is, 777is, 7777is]"]; - N7[label="expr match [7is, 77is, 777is, 7777is] { [x, y, ..] => x + y, }"]; + 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, }"]; N8[label="(dummy_node)"]; N9[label="local x"]; N10[label="local y"]; @@ -15,8 +15,8 @@ digraph block { N13[label="expr x"]; N14[label="expr y"]; N15[label="expr x + y"]; - N16[label="stmt match [7is, 77is, 777is, 7777is] { [x, y, ..] => x + y, };"]; - N17[label="block { match [7is, 77is, 777is, 7777is] { [x, y, ..] => x + y, }; }"]; + N16[label="stmt match [7, 77, 777, 7777] { [x, y, ..] => x + y, };"]; + N17[label="block { match [7, 77, 777, 7777] { [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 8334f81c080d7..39f71d309fdf9 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 [7is, 77is, 777is, 7777is] { + match [7, 77, 777, 7777] { [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 ac1972424dc95..da0120b7bdc52 100644 --- a/src/test/run-make/graphviz-flowgraph/f08.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f08.dot-expected.dot @@ -1,21 +1,21 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 8is"]; + N2[label="expr 8"]; N3[label="local x"]; - N4[label="stmt let x = 8is;"]; + N4[label="stmt let x = 8;"]; N5[label="local _y"]; N6[label="stmt let _y;"]; N7[label="expr x"]; - N8[label="expr 88is"]; - N9[label="expr x > 88is"]; - N10[label="expr 888is"]; + N8[label="expr 88"]; + N9[label="expr x > 88"]; + N10[label="expr 888"]; N11[label="expr _y"]; - N12[label="expr _y = 888is"]; - N13[label="stmt _y = 888is;"]; - N14[label="block { _y = 888is; }"]; - N15[label="expr if x > 88is { _y = 888is; }"]; - N16[label="block { let x = 8is; let _y; if x > 88is { _y = 888is; } }"]; + N12[label="expr _y = 888"]; + N13[label="stmt _y = 888;"]; + N14[label="block { _y = 888; }"]; + N15[label="expr if x > 88 { _y = 888; }"]; + N16[label="block { let x = 8; let _y; if x > 88 { _y = 888; } }"]; 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 ad96f30073bc6..6ba7b03d54da5 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 = 8is; let _y; - if x > 88is { - _y = 888is; + let x = 8; let _y; + if x > 88 { + _y = 888; } } 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 0dc3ff14fba75..c98d1b0bed5de 100644 --- a/src/test/run-make/graphviz-flowgraph/f09.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f09.dot-expected.dot @@ -1,29 +1,29 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 91is"]; + N2[label="expr 91"]; N3[label="local x"]; - N4[label="stmt let x = 91is;"]; + N4[label="stmt let x = 91;"]; N5[label="local _y"]; N6[label="stmt let _y;"]; N7[label="expr x"]; - N8[label="expr 92is"]; - N9[label="expr x > 92is"]; - N10[label="expr 93is"]; + N8[label="expr 92"]; + N9[label="expr x > 92"]; + N10[label="expr 93"]; N11[label="expr _y"]; - N12[label="expr _y = 93is"]; - N13[label="stmt _y = 93is;"]; - N14[label="block { _y = 93is; }"]; - N15[label="expr 94is"]; - N16[label="expr 95is"]; - N17[label="expr 94is + 95is"]; + N12[label="expr _y = 93"]; + N13[label="stmt _y = 93;"]; + N14[label="block { _y = 93; }"]; + N15[label="expr 94"]; + N16[label="expr 95"]; + N17[label="expr 94 + 95"]; N18[label="expr _y"]; - N19[label="expr _y = 94is + 95is"]; - N20[label="stmt _y = 94is + 95is;"]; - N21[label="block { _y = 94is + 95is; }"]; - N22[label="expr { _y = 94is + 95is; }"]; - N23[label="expr if x > 92is { _y = 93is; } else { _y = 94is + 95is; }"]; - N24[label="block {\l let x = 91is;\l let _y;\l if x > 92is { _y = 93is; } else { _y = 94is + 95is; }\l}\l"]; + N19[label="expr _y = 94 + 95"]; + N20[label="stmt _y = 94 + 95;"]; + N21[label="block { _y = 94 + 95; }"]; + N22[label="expr { _y = 94 + 95; }"]; + N23[label="expr if x > 92 { _y = 93; } else { _y = 94 + 95; }"]; + N24[label="block { let x = 91; let _y; if x > 92 { _y = 93; } else { _y = 94 + 95; } }"]; 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 184772e7d5166..a78ccb8a93741 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 = 91is; let _y; - if x > 92is { - _y = 93is; + let x = 91; let _y; + if x > 92 { + _y = 93; } else { - _y = 94is+95is; + _y = 94+95; } } 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 37606ddac70f7..516c39ef560a2 100644 --- a/src/test/run-make/graphviz-flowgraph/f10.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f10.dot-expected.dot @@ -1,20 +1,20 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 10is"]; + N2[label="expr 10"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 10is;"]; + N4[label="stmt let mut x = 10;"]; N5[label="(dummy_node)"]; N6[label="expr x"]; - N7[label="expr 0is"]; - N8[label="expr x > 0is"]; - N9[label="expr while x > 0is { x -= 1is; }"]; - N10[label="expr 1is"]; + N7[label="expr 0"]; + N8[label="expr x > 0"]; + N9[label="expr while x > 0 { x -= 1; }"]; + N10[label="expr 1"]; N11[label="expr x"]; - N12[label="expr x -= 1is"]; - N13[label="stmt x -= 1is;"]; - N14[label="block { x -= 1is; }"]; - N15[label="block { let mut x = 10is; while x > 0is { x -= 1is; } }"]; + N12[label="expr x -= 1"]; + N13[label="stmt x -= 1;"]; + N14[label="block { x -= 1; }"]; + N15[label="block { let mut x = 10; while x > 0 { x -= 1; } }"]; 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 456f740d468d5..0ca7cc5ee86bd 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 = 10is; - while x > 0is { - x -= 1is; + let mut x = 10; + while x > 0 { + x -= 1; } } 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 39a55f1a0926b..9b66fd581cb43 100644 --- a/src/test/run-make/graphviz-flowgraph/f11.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f11.dot-expected.dot @@ -1,20 +1,20 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 11is"]; + N2[label="expr 11"]; N3[label="local mut _x"]; - N4[label="stmt let mut _x = 11is;"]; + N4[label="stmt let mut _x = 11;"]; N5[label="(dummy_node)"]; - N6[label="expr loop { _x -= 1is; }"]; - N7[label="expr 1is"]; + N6[label="expr loop { _x -= 1; }"]; + N7[label="expr 1"]; N8[label="expr _x"]; - N9[label="expr _x -= 1is"]; - N10[label="stmt _x -= 1is;"]; - N11[label="block { _x -= 1is; }"]; - N12[label="stmt loop { _x -= 1is; }"]; + N9[label="expr _x -= 1"]; + N10[label="stmt _x -= 1;"]; + N11[label="block { _x -= 1; }"]; + N12[label="stmt loop { _x -= 1; }"]; N13[label="expr \"unreachable\""]; N14[label="stmt \"unreachable\";"]; - N15[label="block { let mut _x = 11is; loop { _x -= 1is; } \"unreachable\"; }"]; + N15[label="block { let mut _x = 11; loop { _x -= 1; } \"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 65262f249bcd6..d0f3452119e16 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 = 11is; + let mut _x = 11; loop { - _x -= 1is; + _x -= 1; } "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 12b16cc9f8ce8..071af6faf6f96 100644 --- a/src/test/run-make/graphviz-flowgraph/f12.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f12.dot-expected.dot @@ -1,27 +1,27 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 12is"]; + N2[label="expr 12"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 12is;"]; + N4[label="stmt let mut x = 12;"]; N5[label="(dummy_node)"]; - N6[label="expr loop { x -= 1is; if x == 2is { break ; \"unreachable\"; } }"]; - N7[label="expr 1is"]; + N6[label="expr loop { x -= 1; if x == 2 { break ; \"unreachable\"; } }"]; + N7[label="expr 1"]; N8[label="expr x"]; - N9[label="expr x -= 1is"]; - N10[label="stmt x -= 1is;"]; + N9[label="expr x -= 1"]; + N10[label="stmt x -= 1;"]; N11[label="expr x"]; - N12[label="expr 2is"]; - N13[label="expr x == 2is"]; + N12[label="expr 2"]; + N13[label="expr x == 2"]; N14[label="expr break"]; N15[label="(dummy_node)"]; N16[label="stmt break ;"]; N17[label="expr \"unreachable\""]; N18[label="stmt \"unreachable\";"]; N19[label="block { break ; \"unreachable\"; }"]; - N20[label="expr if x == 2is { break ; \"unreachable\"; }"]; - N21[label="block { x -= 1is; if x == 2is { break ; \"unreachable\"; } }"]; - N22[label="block {\l let mut x = 12is;\l loop { x -= 1is; if x == 2is { break ; \"unreachable\"; } }\l}\l"]; + N20[label="expr if x == 2 { break ; \"unreachable\"; }"]; + N21[label="block { x -= 1; if x == 2 { break ; \"unreachable\"; } }"]; + N22[label="block { let mut x = 12; loop { x -= 1; if x == 2 { break ; \"unreachable\"; } } }"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f12.rs b/src/test/run-make/graphviz-flowgraph/f12.rs index 5651d73baffef..90b146340b6f5 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 = 12is; + let mut x = 12; loop { - x -= 1is; - if x == 2is { break; "unreachable"; } + x -= 1; + if x == 2 { 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 ac1a631eb56ed..66250aa441e43 100644 --- a/src/test/run-make/graphviz-flowgraph/f14.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f14.dot-expected.dot @@ -1,20 +1,20 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 14is"]; + N2[label="expr 14"]; N3[label="local x"]; - N4[label="stmt let x = 14is;"]; + N4[label="stmt let x = 14;"]; N5[label="expr x"]; - N6[label="expr 1is"]; - N7[label="expr x > 1is"]; + N6[label="expr 1"]; + N7[label="expr x > 1"]; N8[label="expr return"]; N9[label="(dummy_node)"]; N10[label="stmt return;"]; N11[label="expr \"unreachable\""]; N12[label="stmt \"unreachable\";"]; N13[label="block { return; \"unreachable\"; }"]; - N14[label="expr if x > 1is { return; \"unreachable\"; }"]; - N15[label="block { let x = 14is; if x > 1is { return; \"unreachable\"; } }"]; + N14[label="expr if x > 1 { return; \"unreachable\"; }"]; + N15[label="block { let x = 14; if x > 1 { 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 adb7b193d1617..98ff095c8317c 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 = 14is; - if x > 1is { + let x = 14; + if x > 1 { 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 47e9b3f6cbe1a..4c94630f4e1fb 100644 --- a/src/test/run-make/graphviz-flowgraph/f15.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f15.dot-expected.dot @@ -1,54 +1,54 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 15is"]; + N2[label="expr 15"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 15is;"]; - N5[label="expr 151is"]; + N4[label="stmt let mut x = 15;"]; + N5[label="expr 151"]; N6[label="local mut y"]; - N7[label="stmt let mut y = 151is;"]; + N7[label="stmt let mut y = 151;"]; N8[label="(dummy_node)"]; - N9[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l y -= 4is;\l x -= 5is;\l }\l"]; + N9[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"]; N10[label="(dummy_node)"]; - N11[label="expr \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l"]; + N11[label="expr \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { break ; \"unreachable\"; }\l y -= 3;\l }\l"]; N12[label="expr x"]; - N13[label="expr 1is"]; - N14[label="expr x == 1is"]; + N13[label="expr 1"]; + N14[label="expr x == 1"]; N15[label="expr break \'outer"]; N16[label="(dummy_node)"]; N17[label="stmt break \'outer ;"]; N18[label="expr \"unreachable\""]; N19[label="stmt \"unreachable\";"]; N20[label="block { break \'outer ; \"unreachable\"; }"]; - N21[label="expr if x == 1is { break \'outer ; \"unreachable\"; }"]; - N22[label="stmt if x == 1is { break \'outer ; \"unreachable\"; }"]; + N21[label="expr if x == 1 { break \'outer ; \"unreachable\"; }"]; + N22[label="stmt if x == 1 { break \'outer ; \"unreachable\"; }"]; N23[label="expr y"]; - N24[label="expr 2is"]; - N25[label="expr y >= 2is"]; + N24[label="expr 2"]; + N25[label="expr y >= 2"]; N26[label="expr break"]; N27[label="(dummy_node)"]; N28[label="stmt break ;"]; N29[label="expr \"unreachable\""]; N30[label="stmt \"unreachable\";"]; N31[label="block { break ; \"unreachable\"; }"]; - N32[label="expr if y >= 2is { break ; \"unreachable\"; }"]; - N33[label="stmt if y >= 2is { break ; \"unreachable\"; }"]; - N34[label="expr 3is"]; + N32[label="expr if y >= 2 { break ; \"unreachable\"; }"]; + N33[label="stmt if y >= 2 { break ; \"unreachable\"; }"]; + N34[label="expr 3"]; N35[label="expr y"]; - N36[label="expr y -= 3is"]; - N37[label="stmt y -= 3is;"]; - N38[label="block {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l}\l"]; - N39[label="stmt \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l"]; - N40[label="expr 4is"]; + N36[label="expr y -= 3"]; + N37[label="stmt y -= 3;"]; + N38[label="block {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { break ; \"unreachable\"; }\l y -= 3;\l}\l"]; + N39[label="stmt \'inner:\l loop {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { break ; \"unreachable\"; }\l y -= 3;\l }\l"]; + N40[label="expr 4"]; N41[label="expr y"]; - N42[label="expr y -= 4is"]; - N43[label="stmt y -= 4is;"]; - N44[label="expr 5is"]; + N42[label="expr y -= 4"]; + N43[label="stmt y -= 4;"]; + N44[label="expr 5"]; N45[label="expr x"]; - N46[label="expr x -= 5is"]; - N47[label="stmt x -= 5is;"]; - N48[label="block {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l y -= 4is;\l x -= 5is;\l}\l"]; - N49[label="block {\l let mut x = 15is;\l let mut y = 151is;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { break ; \"unreachable\"; }\l y -= 3is;\l }\l y -= 4is;\l x -= 5is;\l }\l}\l"]; + N46[label="expr x -= 5"]; + N47[label="stmt x -= 5;"]; + N48[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"]; + N49[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"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f15.rs b/src/test/run-make/graphviz-flowgraph/f15.rs index a1141eb67689a..056458e5558de 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 = 15is; - let mut y = 151is; + let mut x = 15; + let mut y = 151; 'outer: loop { 'inner: loop { - if x == 1is { + if x == 1 { break 'outer; "unreachable"; } - if y >= 2is { + if y >= 2 { break; "unreachable"; } - y -= 3is; + y -= 3; } - y -= 4is; - x -= 5is; + y -= 4; + x -= 5; } } 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 a37869b226498..d7d027cefb59b 100644 --- a/src/test/run-make/graphviz-flowgraph/f16.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f16.dot-expected.dot @@ -1,57 +1,57 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 16is"]; + N2[label="expr 16"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 16is;"]; - N5[label="expr 16is"]; + N4[label="stmt let mut x = 16;"]; + N5[label="expr 16"]; N6[label="local mut y"]; - N7[label="stmt let mut y = 16is;"]; + N7[label="stmt let mut y = 16;"]; N8[label="(dummy_node)"]; - N9[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l y -= 1is;\l x -= 1is;\l }\l"]; + N9[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"]; N10[label="(dummy_node)"]; - N11[label="expr \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l"]; + N11[label="expr \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 1 { break ; \"unreachable\"; }\l y -= 1;\l }\l"]; N12[label="expr x"]; - N13[label="expr 1is"]; - N14[label="expr x == 1is"]; + N13[label="expr 1"]; + N14[label="expr x == 1"]; N15[label="expr continue \'outer"]; N16[label="(dummy_node)"]; N17[label="stmt continue \'outer ;"]; N18[label="expr \"unreachable\""]; N19[label="stmt \"unreachable\";"]; N20[label="block { continue \'outer ; \"unreachable\"; }"]; - N21[label="expr if x == 1is { continue \'outer ; \"unreachable\"; }"]; - N22[label="stmt if x == 1is { continue \'outer ; \"unreachable\"; }"]; + N21[label="expr if x == 1 { continue \'outer ; \"unreachable\"; }"]; + N22[label="stmt if x == 1 { continue \'outer ; \"unreachable\"; }"]; N23[label="expr y"]; - N24[label="expr 1is"]; - N25[label="expr y >= 1is"]; + N24[label="expr 1"]; + N25[label="expr y >= 1"]; N26[label="expr break"]; N27[label="(dummy_node)"]; N28[label="stmt break ;"]; N29[label="expr \"unreachable\""]; N30[label="stmt \"unreachable\";"]; N31[label="block { break ; \"unreachable\"; }"]; - N32[label="expr if y >= 1is { break ; \"unreachable\"; }"]; - N33[label="stmt if y >= 1is { break ; \"unreachable\"; }"]; - N34[label="expr 1is"]; + N32[label="expr if y >= 1 { break ; \"unreachable\"; }"]; + N33[label="stmt if y >= 1 { break ; \"unreachable\"; }"]; + N34[label="expr 1"]; N35[label="expr y"]; - N36[label="expr y -= 1is"]; - N37[label="stmt y -= 1is;"]; - N38[label="block {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l}\l"]; - N39[label="stmt \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l"]; - N40[label="expr 1is"]; + N36[label="expr y -= 1"]; + N37[label="stmt y -= 1;"]; + N38[label="block {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 1 { break ; \"unreachable\"; }\l y -= 1;\l}\l"]; + N39[label="stmt \'inner:\l loop {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 1 { break ; \"unreachable\"; }\l y -= 1;\l }\l"]; + N40[label="expr 1"]; N41[label="expr y"]; - N42[label="expr y -= 1is"]; - N43[label="stmt y -= 1is;"]; - N44[label="expr 1is"]; + N42[label="expr y -= 1"]; + N43[label="stmt y -= 1;"]; + N44[label="expr 1"]; N45[label="expr x"]; - N46[label="expr x -= 1is"]; - N47[label="stmt x -= 1is;"]; - N48[label="block {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l y -= 1is;\l x -= 1is;\l}\l"]; - N49[label="stmt \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l y -= 1is;\l x -= 1is;\l }\l"]; + N46[label="expr x -= 1"]; + N47[label="stmt x -= 1;"]; + N48[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"]; + N49[label="stmt \'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"]; N50[label="expr \"unreachable\""]; N51[label="stmt \"unreachable\";"]; - N52[label="block {\l let mut x = 16is;\l let mut y = 16is;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 1is { break ; \"unreachable\"; }\l y -= 1is;\l }\l y -= 1is;\l x -= 1is;\l }\l \"unreachable\";\l}\l"]; + N52[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"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f16.rs b/src/test/run-make/graphviz-flowgraph/f16.rs index 5d0e9f963a021..e225b0080e59a 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 = 16is; - let mut y = 16is; + let mut x = 16; + let mut y = 16; 'outer: loop { 'inner: loop { - if x == 1is { + if x == 1 { continue 'outer; "unreachable"; } - if y >= 1is { + if y >= 1 { break; "unreachable"; } - y -= 1is; + y -= 1; } - y -= 1is; - x -= 1is; + y -= 1; + x -= 1; } "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 7941b4f7ce540..f87b70a71caea 100644 --- a/src/test/run-make/graphviz-flowgraph/f17.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f17.dot-expected.dot @@ -1,13 +1,13 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 1is"]; - N3[label="expr 7is"]; - N4[label="expr 17is"]; - N5[label="expr [1is, 7is, 17is]"]; + N2[label="expr 1"]; + N3[label="expr 7"]; + N4[label="expr 17"]; + N5[label="expr [1, 7, 17]"]; N6[label="local _v"]; - N7[label="stmt let _v = [1is, 7is, 17is];"]; - N8[label="block { let _v = [1is, 7is, 17is]; }"]; + N7[label="stmt let _v = [1, 7, 17];"]; + N8[label="block { let _v = [1, 7, 17]; }"]; 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 de9b3bd567611..23f5bb8a1eb17 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 = [1is, 7is, 17is]; + let _v = [1, 7, 17]; } 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 46f1634416e5b..796bf4910c9e2 100644 --- a/src/test/run-make/graphviz-flowgraph/f21.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f21.dot-expected.dot @@ -1,52 +1,52 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 15is"]; + N2[label="expr 15"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 15is;"]; - N5[label="expr 151is"]; + N4[label="stmt let mut x = 15;"]; + N5[label="expr 151"]; N6[label="local mut y"]; - N7[label="stmt let mut y = 151is;"]; + N7[label="stmt let mut y = 151;"]; N8[label="(dummy_node)"]; - N9[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l \"unreachable\";\l }\l"]; + N9[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"]; N10[label="(dummy_node)"]; - N11[label="expr \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l"]; + N11[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"]; N12[label="expr x"]; - N13[label="expr 1is"]; - N14[label="expr x == 1is"]; + N13[label="expr 1"]; + N14[label="expr x == 1"]; N15[label="expr break \'outer"]; N16[label="(dummy_node)"]; N17[label="stmt break \'outer ;"]; N18[label="expr \"unreachable\""]; N19[label="stmt \"unreachable\";"]; N20[label="block { break \'outer ; \"unreachable\"; }"]; - N21[label="expr if x == 1is { break \'outer ; \"unreachable\"; }"]; - N22[label="stmt if x == 1is { break \'outer ; \"unreachable\"; }"]; + N21[label="expr if x == 1 { break \'outer ; \"unreachable\"; }"]; + N22[label="stmt if x == 1 { break \'outer ; \"unreachable\"; }"]; N23[label="expr y"]; - N24[label="expr 2is"]; - N25[label="expr y >= 2is"]; + N24[label="expr 2"]; + N25[label="expr y >= 2"]; N26[label="expr return"]; N27[label="(dummy_node)"]; N28[label="stmt return;"]; N29[label="expr \"unreachable\""]; N30[label="stmt \"unreachable\";"]; N31[label="block { return; \"unreachable\"; }"]; - N32[label="expr if y >= 2is { return; \"unreachable\"; }"]; - N33[label="stmt if y >= 2is { return; \"unreachable\"; }"]; - N34[label="expr 3is"]; + N32[label="expr if y >= 2 { return; \"unreachable\"; }"]; + N33[label="stmt if y >= 2 { return; \"unreachable\"; }"]; + N34[label="expr 3"]; N35[label="expr y"]; - N36[label="expr y -= 3is"]; - N37[label="stmt y -= 3is;"]; - N38[label="expr 5is"]; + N36[label="expr y -= 3"]; + N37[label="stmt y -= 3;"]; + N38[label="expr 5"]; N39[label="expr x"]; - N40[label="expr x -= 5is"]; - N41[label="stmt x -= 5is;"]; - N42[label="block {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l}\l"]; - N43[label="stmt \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l"]; + N40[label="expr x -= 5"]; + N41[label="stmt x -= 5;"]; + N42[label="block {\l if x == 1 { break \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l y -= 3;\l x -= 5;\l}\l"]; + N43[label="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"]; N44[label="expr \"unreachable\""]; N45[label="stmt \"unreachable\";"]; - N46[label="block {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l \"unreachable\";\l}\l"]; - N47[label="block {\l let mut x = 15is;\l let mut y = 151is;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { break \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l y -= 3is;\l x -= 5is;\l }\l \"unreachable\";\l }\l}\l"]; + N46[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"]; + N47[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"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f21.rs b/src/test/run-make/graphviz-flowgraph/f21.rs index 25e93f65110ad..70083ed8312cb 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 = 15is; - let mut y = 151is; + let mut x = 15; + let mut y = 151; 'outer: loop { 'inner: loop { - if x == 1is { + if x == 1 { break 'outer; "unreachable"; } - if y >= 2is { + if y >= 2 { return; "unreachable"; } - y -= 3is; - x -= 5is; + y -= 3; + x -= 5; } "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 3f35a9b0f9ab3..9e8049f07415a 100644 --- a/src/test/run-make/graphviz-flowgraph/f22.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f22.dot-expected.dot @@ -1,55 +1,55 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 15is"]; + N2[label="expr 15"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 15is;"]; - N5[label="expr 151is"]; + N4[label="stmt let mut x = 15;"]; + N5[label="expr 151"]; N6[label="local mut y"]; - N7[label="stmt let mut y = 151is;"]; + N7[label="stmt let mut y = 151;"]; N8[label="(dummy_node)"]; - N9[label="expr \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l \"unreachable\";\l }\l"]; + N9[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"]; N10[label="(dummy_node)"]; - N11[label="expr \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l"]; + N11[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"]; N12[label="expr x"]; - N13[label="expr 1is"]; - N14[label="expr x == 1is"]; + N13[label="expr 1"]; + N14[label="expr x == 1"]; N15[label="expr continue \'outer"]; N16[label="(dummy_node)"]; N17[label="stmt continue \'outer ;"]; N18[label="expr \"unreachable\""]; N19[label="stmt \"unreachable\";"]; N20[label="block { continue \'outer ; \"unreachable\"; }"]; - N21[label="expr if x == 1is { continue \'outer ; \"unreachable\"; }"]; - N22[label="stmt if x == 1is { continue \'outer ; \"unreachable\"; }"]; + N21[label="expr if x == 1 { continue \'outer ; \"unreachable\"; }"]; + N22[label="stmt if x == 1 { continue \'outer ; \"unreachable\"; }"]; N23[label="expr y"]; - N24[label="expr 2is"]; - N25[label="expr y >= 2is"]; + N24[label="expr 2"]; + N25[label="expr y >= 2"]; N26[label="expr return"]; N27[label="(dummy_node)"]; N28[label="stmt return;"]; N29[label="expr \"unreachable\""]; N30[label="stmt \"unreachable\";"]; N31[label="block { return; \"unreachable\"; }"]; - N32[label="expr if y >= 2is { return; \"unreachable\"; }"]; - N33[label="stmt if y >= 2is { return; \"unreachable\"; }"]; - N34[label="expr 1is"]; + N32[label="expr if y >= 2 { return; \"unreachable\"; }"]; + N33[label="stmt if y >= 2 { return; \"unreachable\"; }"]; + N34[label="expr 1"]; N35[label="expr x"]; - N36[label="expr x -= 1is"]; - N37[label="stmt x -= 1is;"]; - N38[label="expr 3is"]; + N36[label="expr x -= 1"]; + N37[label="stmt x -= 1;"]; + N38[label="expr 3"]; N39[label="expr y"]; - N40[label="expr y -= 3is"]; - N41[label="stmt y -= 3is;"]; - N42[label="block {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l}\l"]; - N43[label="stmt \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l"]; + N40[label="expr y -= 3"]; + N41[label="stmt y -= 3;"]; + N42[label="block {\l if x == 1 { continue \'outer ; \"unreachable\"; }\l if y >= 2 { return; \"unreachable\"; }\l x -= 1;\l y -= 3;\l}\l"]; + N43[label="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"]; N44[label="expr \"unreachable\""]; N45[label="stmt \"unreachable\";"]; - N46[label="block {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l \"unreachable\";\l}\l"]; - N47[label="stmt \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l \"unreachable\";\l }\l"]; + N46[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"]; + N47[label="stmt \'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"]; N48[label="expr \"unreachable\""]; N49[label="stmt \"unreachable\";"]; - N50[label="block {\l let mut x = 15is;\l let mut y = 151is;\l \'outer:\l loop {\l \'inner:\l loop {\l if x == 1is { continue \'outer ; \"unreachable\"; }\l if y >= 2is { return; \"unreachable\"; }\l x -= 1is;\l y -= 3is;\l }\l \"unreachable\";\l }\l \"unreachable\";\l}\l"]; + N50[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"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f22.rs b/src/test/run-make/graphviz-flowgraph/f22.rs index 6de703a42f696..b35aac9ec422e 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 = 15is; - let mut y = 151is; + let mut x = 15; + let mut y = 151; 'outer: loop { 'inner: loop { - if x == 1is { + if x == 1 { continue 'outer; "unreachable"; } - if y >= 2is { + if y >= 2 { return; "unreachable"; } - x -= 1is; - y -= 3is; + x -= 1; + y -= 3; } "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 c9f7d4cdf0aab..b3f285049c576 100644 --- a/src/test/run-make/graphviz-flowgraph/f23.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f23.dot-expected.dot @@ -1,57 +1,57 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 23is"]; + N2[label="expr 23"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 23is;"]; - N5[label="expr 23is"]; + N4[label="stmt let mut x = 23;"]; + N5[label="expr 23"]; N6[label="local mut y"]; - N7[label="stmt let mut y = 23is;"]; - N8[label="expr 23is"]; + N7[label="stmt let mut y = 23;"]; + N8[label="expr 23"]; N9[label="local mut z"]; - N10[label="stmt let mut z = 23is;"]; + N10[label="stmt let mut z = 23;"]; N11[label="(dummy_node)"]; N12[label="expr x"]; - N13[label="expr 0is"]; - N14[label="expr x > 0is"]; - N15[label="expr while x > 0is {\l x -= 1is;\l while y > 0is {\l y -= 1is;\l while z > 0is { z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l}\l"]; - N16[label="expr 1is"]; + N13[label="expr 0"]; + N14[label="expr x > 0"]; + N15[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"]; + N16[label="expr 1"]; N17[label="expr x"]; - N18[label="expr x -= 1is"]; - N19[label="stmt x -= 1is;"]; + N18[label="expr x -= 1"]; + N19[label="stmt x -= 1;"]; N20[label="(dummy_node)"]; N21[label="expr y"]; - N22[label="expr 0is"]; - N23[label="expr y > 0is"]; - N24[label="expr while y > 0is {\l y -= 1is;\l while z > 0is { z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l}\l"]; - N25[label="expr 1is"]; + N22[label="expr 0"]; + N23[label="expr y > 0"]; + N24[label="expr while y > 0 {\l y -= 1;\l while z > 0 { z -= 1; }\l if x > 10 { return; \"unreachable\"; }\l}\l"]; + N25[label="expr 1"]; N26[label="expr y"]; - N27[label="expr y -= 1is"]; - N28[label="stmt y -= 1is;"]; + N27[label="expr y -= 1"]; + N28[label="stmt y -= 1;"]; N29[label="(dummy_node)"]; N30[label="expr z"]; - N31[label="expr 0is"]; - N32[label="expr z > 0is"]; - N33[label="expr while z > 0is { z -= 1is; }"]; - N34[label="expr 1is"]; + N31[label="expr 0"]; + N32[label="expr z > 0"]; + N33[label="expr while z > 0 { z -= 1; }"]; + N34[label="expr 1"]; N35[label="expr z"]; - N36[label="expr z -= 1is"]; - N37[label="stmt z -= 1is;"]; - N38[label="block { z -= 1is; }"]; - N39[label="stmt while z > 0is { z -= 1is; }"]; + N36[label="expr z -= 1"]; + N37[label="stmt z -= 1;"]; + N38[label="block { z -= 1; }"]; + N39[label="stmt while z > 0 { z -= 1; }"]; N40[label="expr x"]; - N41[label="expr 10is"]; - N42[label="expr x > 10is"]; + N41[label="expr 10"]; + N42[label="expr x > 10"]; N43[label="expr return"]; N44[label="(dummy_node)"]; N45[label="stmt return;"]; N46[label="expr \"unreachable\""]; N47[label="stmt \"unreachable\";"]; N48[label="block { return; \"unreachable\"; }"]; - N49[label="expr if x > 10is { return; \"unreachable\"; }"]; - N50[label="block {\l y -= 1is;\l while z > 0is { z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l}\l"]; - N51[label="block {\l x -= 1is;\l while y > 0is {\l y -= 1is;\l while z > 0is { z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l}\l"]; - N52[label="block {\l let mut x = 23is;\l let mut y = 23is;\l let mut z = 23is;\l while x > 0is {\l x -= 1is;\l while y > 0is {\l y -= 1is;\l while z > 0is { z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l }\l}\l"]; + N49[label="expr if x > 10 { return; \"unreachable\"; }"]; + N50[label="block { y -= 1; while z > 0 { z -= 1; } if x > 10 { return; \"unreachable\"; } }"]; + N51[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"]; + N52[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"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f23.rs b/src/test/run-make/graphviz-flowgraph/f23.rs index 6ffa1838903f0..52341a3fbd408 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 = 23is; - let mut y = 23is; - let mut z = 23is; + let mut x = 23; + let mut y = 23; + let mut z = 23; - while x > 0is { - x -= 1is; + while x > 0 { + x -= 1; - while y > 0is { - y -= 1is; + while y > 0 { + y -= 1; - while z > 0is { z -= 1is; } + while z > 0 { z -= 1; } - if x > 10is { + if x > 10 { 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 a5373bda39b18..43b3295bf3be9 100644 --- a/src/test/run-make/graphviz-flowgraph/f24.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f24.dot-expected.dot @@ -1,81 +1,81 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 24is"]; + N2[label="expr 24"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 24is;"]; - N5[label="expr 24is"]; + N4[label="stmt let mut x = 24;"]; + N5[label="expr 24"]; N6[label="local mut y"]; - N7[label="stmt let mut y = 24is;"]; - N8[label="expr 24is"]; + N7[label="stmt let mut y = 24;"]; + N8[label="expr 24"]; N9[label="local mut z"]; - N10[label="stmt let mut z = 24is;"]; + N10[label="stmt let mut z = 24;"]; N11[label="(dummy_node)"]; - N12[label="expr loop {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l}\l"]; + N12[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"]; N13[label="expr x"]; - N14[label="expr 0is"]; - N15[label="expr x == 0is"]; + N14[label="expr 0"]; + N15[label="expr x == 0"]; N16[label="expr break"]; N17[label="(dummy_node)"]; N18[label="stmt break ;"]; N19[label="expr \"unreachable\""]; N20[label="stmt \"unreachable\";"]; N21[label="block { break ; \"unreachable\"; }"]; - N22[label="expr if x == 0is { break ; \"unreachable\"; }"]; - N23[label="stmt if x == 0is { break ; \"unreachable\"; }"]; - N24[label="expr 1is"]; + N22[label="expr if x == 0 { break ; \"unreachable\"; }"]; + N23[label="stmt if x == 0 { break ; \"unreachable\"; }"]; + N24[label="expr 1"]; N25[label="expr x"]; - N26[label="expr x -= 1is"]; - N27[label="stmt x -= 1is;"]; + N26[label="expr x -= 1"]; + N27[label="stmt x -= 1;"]; N28[label="(dummy_node)"]; - N29[label="expr loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l}\l"]; + N29[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"]; N30[label="expr y"]; - N31[label="expr 0is"]; - N32[label="expr y == 0is"]; + N31[label="expr 0"]; + N32[label="expr y == 0"]; N33[label="expr break"]; N34[label="(dummy_node)"]; N35[label="stmt break ;"]; N36[label="expr \"unreachable\""]; N37[label="stmt \"unreachable\";"]; N38[label="block { break ; \"unreachable\"; }"]; - N39[label="expr if y == 0is { break ; \"unreachable\"; }"]; - N40[label="stmt if y == 0is { break ; \"unreachable\"; }"]; - N41[label="expr 1is"]; + N39[label="expr if y == 0 { break ; \"unreachable\"; }"]; + N40[label="stmt if y == 0 { break ; \"unreachable\"; }"]; + N41[label="expr 1"]; N42[label="expr y"]; - N43[label="expr y -= 1is"]; - N44[label="stmt y -= 1is;"]; + N43[label="expr y -= 1"]; + N44[label="stmt y -= 1;"]; N45[label="(dummy_node)"]; - N46[label="expr loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"]; + N46[label="expr loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; N47[label="expr z"]; - N48[label="expr 0is"]; - N49[label="expr z == 0is"]; + N48[label="expr 0"]; + N49[label="expr z == 0"]; N50[label="expr break"]; N51[label="(dummy_node)"]; N52[label="stmt break ;"]; N53[label="expr \"unreachable\""]; N54[label="stmt \"unreachable\";"]; N55[label="block { break ; \"unreachable\"; }"]; - N56[label="expr if z == 0is { break ; \"unreachable\"; }"]; - N57[label="stmt if z == 0is { break ; \"unreachable\"; }"]; - N58[label="expr 1is"]; + N56[label="expr if z == 0 { break ; \"unreachable\"; }"]; + N57[label="stmt if z == 0 { break ; \"unreachable\"; }"]; + N58[label="expr 1"]; N59[label="expr z"]; - N60[label="expr z -= 1is"]; - N61[label="stmt z -= 1is;"]; - N62[label="block { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"]; - N63[label="stmt loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"]; + N60[label="expr z -= 1"]; + N61[label="stmt z -= 1;"]; + N62[label="block { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N63[label="stmt loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; N64[label="expr x"]; - N65[label="expr 10is"]; - N66[label="expr x > 10is"]; + N65[label="expr 10"]; + N66[label="expr x > 10"]; N67[label="expr return"]; N68[label="(dummy_node)"]; N69[label="stmt return;"]; N70[label="expr \"unreachable\""]; N71[label="stmt \"unreachable\";"]; N72[label="block { return; \"unreachable\"; }"]; - N73[label="expr if x > 10is { return; \"unreachable\"; }"]; - N74[label="block {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l}\l"]; - N75[label="block {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l}\l"]; - N76[label="block {\l let mut x = 24is;\l let mut y = 24is;\l let mut z = 24is;\l loop {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { return; \"unreachable\"; }\l }\l }\l}\l"]; + N73[label="expr if x > 10 { return; \"unreachable\"; }"]; + N74[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"]; + N75[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"]; + N76[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"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f24.rs b/src/test/run-make/graphviz-flowgraph/f24.rs index ebaf7f2810103..f796d660a1856 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 = 24is; - let mut y = 24is; - let mut z = 24is; + let mut x = 24; + let mut y = 24; + let mut z = 24; loop { - if x == 0is { break; "unreachable"; } - x -= 1is; + if x == 0 { break; "unreachable"; } + x -= 1; loop { - if y == 0is { break; "unreachable"; } - y -= 1is; + if y == 0 { break; "unreachable"; } + y -= 1; loop { - if z == 0is { break; "unreachable"; } - z -= 1is; + if z == 0 { break; "unreachable"; } + z -= 1; } - if x > 10is { + if x > 10 { 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 2611219e816e9..50fdffb781d11 100644 --- a/src/test/run-make/graphviz-flowgraph/f25.dot-expected.dot +++ b/src/test/run-make/graphviz-flowgraph/f25.dot-expected.dot @@ -1,81 +1,81 @@ digraph block { N0[label="entry"]; N1[label="exit"]; - N2[label="expr 25is"]; + N2[label="expr 25"]; N3[label="local mut x"]; - N4[label="stmt let mut x = 25is;"]; - N5[label="expr 25is"]; + N4[label="stmt let mut x = 25;"]; + N5[label="expr 25"]; N6[label="local mut y"]; - N7[label="stmt let mut y = 25is;"]; - N8[label="expr 25is"]; + N7[label="stmt let mut y = 25;"]; + N8[label="expr 25"]; N9[label="local mut z"]; - N10[label="stmt let mut z = 25is;"]; + N10[label="stmt let mut z = 25;"]; N11[label="(dummy_node)"]; - N12[label="expr \'a:\l loop {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l \'a:\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { continue \'a ; \"unreachable\"; }\l }\l }\l"]; + N12[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"]; N13[label="expr x"]; - N14[label="expr 0is"]; - N15[label="expr x == 0is"]; + N14[label="expr 0"]; + N15[label="expr x == 0"]; N16[label="expr break"]; N17[label="(dummy_node)"]; N18[label="stmt break ;"]; N19[label="expr \"unreachable\""]; N20[label="stmt \"unreachable\";"]; N21[label="block { break ; \"unreachable\"; }"]; - N22[label="expr if x == 0is { break ; \"unreachable\"; }"]; - N23[label="stmt if x == 0is { break ; \"unreachable\"; }"]; - N24[label="expr 1is"]; + N22[label="expr if x == 0 { break ; \"unreachable\"; }"]; + N23[label="stmt if x == 0 { break ; \"unreachable\"; }"]; + N24[label="expr 1"]; N25[label="expr x"]; - N26[label="expr x -= 1is"]; - N27[label="stmt x -= 1is;"]; + N26[label="expr x -= 1"]; + N27[label="stmt x -= 1;"]; N28[label="(dummy_node)"]; - N29[label="expr \'a:\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { continue \'a ; \"unreachable\"; }\l }\l"]; + N29[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"]; N30[label="expr y"]; - N31[label="expr 0is"]; - N32[label="expr y == 0is"]; + N31[label="expr 0"]; + N32[label="expr y == 0"]; N33[label="expr break"]; N34[label="(dummy_node)"]; N35[label="stmt break ;"]; N36[label="expr \"unreachable\""]; N37[label="stmt \"unreachable\";"]; N38[label="block { break ; \"unreachable\"; }"]; - N39[label="expr if y == 0is { break ; \"unreachable\"; }"]; - N40[label="stmt if y == 0is { break ; \"unreachable\"; }"]; - N41[label="expr 1is"]; + N39[label="expr if y == 0 { break ; \"unreachable\"; }"]; + N40[label="stmt if y == 0 { break ; \"unreachable\"; }"]; + N41[label="expr 1"]; N42[label="expr y"]; - N43[label="expr y -= 1is"]; - N44[label="stmt y -= 1is;"]; + N43[label="expr y -= 1"]; + N44[label="stmt y -= 1;"]; N45[label="(dummy_node)"]; - N46[label="expr \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"]; + N46[label="expr \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; N47[label="expr z"]; - N48[label="expr 0is"]; - N49[label="expr z == 0is"]; + N48[label="expr 0"]; + N49[label="expr z == 0"]; N50[label="expr break"]; N51[label="(dummy_node)"]; N52[label="stmt break ;"]; N53[label="expr \"unreachable\""]; N54[label="stmt \"unreachable\";"]; N55[label="block { break ; \"unreachable\"; }"]; - N56[label="expr if z == 0is { break ; \"unreachable\"; }"]; - N57[label="stmt if z == 0is { break ; \"unreachable\"; }"]; - N58[label="expr 1is"]; + N56[label="expr if z == 0 { break ; \"unreachable\"; }"]; + N57[label="stmt if z == 0 { break ; \"unreachable\"; }"]; + N58[label="expr 1"]; N59[label="expr z"]; - N60[label="expr z -= 1is"]; - N61[label="stmt z -= 1is;"]; - N62[label="block { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"]; - N63[label="stmt \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }"]; + N60[label="expr z -= 1"]; + N61[label="stmt z -= 1;"]; + N62[label="block { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; + N63[label="stmt \'a: loop { if z == 0 { break ; \"unreachable\"; } z -= 1; }"]; N64[label="expr x"]; - N65[label="expr 10is"]; - N66[label="expr x > 10is"]; + N65[label="expr 10"]; + N66[label="expr x > 10"]; N67[label="expr continue \'a"]; N68[label="(dummy_node)"]; N69[label="stmt continue \'a ;"]; N70[label="expr \"unreachable\""]; N71[label="stmt \"unreachable\";"]; N72[label="block { continue \'a ; \"unreachable\"; }"]; - N73[label="expr if x > 10is { continue \'a ; \"unreachable\"; }"]; - N74[label="block {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { continue \'a ; \"unreachable\"; }\l}\l"]; - N75[label="block {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l \'a:\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a: loop { if z == 0is { break ; \"unreachable\"; } z -= 1is; }\l if x > 10is { continue \'a ; \"unreachable\"; }\l }\l}\l"]; - N76[label="block {\l let mut x = 25is;\l let mut y = 25is;\l let mut z = 25is;\l \'a:\l loop {\l if x == 0is { break ; \"unreachable\"; }\l x -= 1is;\l \'a:\l loop {\l if y == 0is { break ; \"unreachable\"; }\l y -= 1is;\l \'a:\l loop {\l if z == 0is { break ; \"unreachable\"; }\l z -= 1is;\l }\l if x > 10is { continue \'a ; \"unreachable\"; }\l }\l }\l}\l"]; + N73[label="expr if x > 10 { continue \'a ; \"unreachable\"; }"]; + N74[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"]; + N75[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"]; + N76[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"]; N0 -> N2; N2 -> N3; N3 -> N4; diff --git a/src/test/run-make/graphviz-flowgraph/f25.rs b/src/test/run-make/graphviz-flowgraph/f25.rs index 8896a854787b9..2ee2e48fd10e0 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 = 25is; - let mut y = 25is; - let mut z = 25is; + let mut x = 25; + let mut y = 25; + let mut z = 25; 'a: loop { - if x == 0is { break; "unreachable"; } - x -= 1is; + if x == 0 { break; "unreachable"; } + x -= 1; 'a: loop { - if y == 0is { break; "unreachable"; } - y -= 1is; + if y == 0 { break; "unreachable"; } + y -= 1; 'a: loop { - if z == 0is { break; "unreachable"; } - z -= 1is; + if z == 0 { break; "unreachable"; } + z -= 1; } - if x > 10is { + if x > 10 { continue 'a; "unreachable"; } diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs index 690f40b4f5b73..cb3b3d9af38b2 100644 --- a/src/test/run-make/save-analysis/foo.rs +++ b/src/test/run-make/save-analysis/foo.rs @@ -50,7 +50,7 @@ fn test_alias(i: Option<::Item>) { myflate::deflate_bytes(&[]); - let x = (3is, 4us); + let x = (3, 4us); let y = x.1; } diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs index 0acc70f6b5d83..ce628668996b7 100644 --- a/src/test/run-pass/ifmt.rs +++ b/src/test/run-pass/ifmt.rs @@ -77,8 +77,8 @@ pub fn main() { t!(format!("{:X}", B), "adios"); t!(format!("foo {} ☃☃☃☃☃☃", "bar"), "foo bar ☃☃☃☃☃☃"); t!(format!("{1} {0}", 0, 1), "1 0"); - t!(format!("{foo} {bar}", foo=0, bar=1is), "0 1"); - t!(format!("{foo} {1} {bar} {0}", 0is, 1is, foo=2is, bar=3is), "2 1 3 0"); + t!(format!("{foo} {bar}", foo=0, bar=1), "0 1"); + t!(format!("{foo} {1} {bar} {0}", 0, 1, foo=2, bar=3), "2 1 3 0"); t!(format!("{} {0}", "a"), "a a"); t!(format!("{foo_bar}", foo_bar=1), "1"); t!(format!("{}", 5 + 5), "10"); diff --git a/src/test/run-pass/issue-13494.rs b/src/test/run-pass/issue-13494.rs index 5025d4034680e..95562d75c3ea4 100644 --- a/src/test/run-pass/issue-13494.rs +++ b/src/test/run-pass/issue-13494.rs @@ -25,7 +25,7 @@ fn main() { let _t = Thread::spawn(move|| { helper(rx) }); let (snd, rcv) = channel::(); for _ in 1..100000 { - snd.send(1i).unwrap(); + snd.send(1).unwrap(); let (tx2, rx2) = channel(); tx.send(tx2).unwrap(); select! { diff --git a/src/test/run-pass/numeric-method-autoexport.rs b/src/test/run-pass/numeric-method-autoexport.rs index 140cf33cd1d0f..fec4a806b4389 100644 --- a/src/test/run-pass/numeric-method-autoexport.rs +++ b/src/test/run-pass/numeric-method-autoexport.rs @@ -29,7 +29,7 @@ pub fn main() { // uints // num - assert_eq!(15u.add(6us), 21us); + assert_eq!(15us.add(6us), 21us); assert_eq!(15u8.add(6u8), 21u8); assert_eq!(15u16.add(6u16), 21u16); assert_eq!(15u32.add(6u32), 21u32); @@ -37,6 +37,6 @@ pub fn main() { // floats // num - assert_eq!(10f32.to_int().unwrap(), 10); - assert_eq!(10f64.to_int().unwrap(), 10); + assert_eq!(10f32.to_i32().unwrap(), 10); + assert_eq!(10f64.to_i32().unwrap(), 10); }