diff options
| author | Corey Richardson <corey@octayn.net> | 2014-12-05 18:12:25 -0800 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2015-01-06 16:48:33 -0500 |
| commit | 5a4ca319185a3f399986bc5e5a2d0a96fac583ae (patch) | |
| tree | 25e545200752d8ff295b93d5482ac68476cd3922 /src/test/debuginfo | |
| parent | abcbe276954525bc7902a5a20762a580d5ed4ea2 (diff) | |
| download | rust-5a4ca319185a3f399986bc5e5a2d0a96fac583ae.tar.gz rust-5a4ca319185a3f399986bc5e5a2d0a96fac583ae.zip | |
test fallout from isize/usize
Diffstat (limited to 'src/test/debuginfo')
| -rw-r--r-- | src/test/debuginfo/basic-types-globals-metadata.rs | 4 | ||||
| -rw-r--r-- | src/test/debuginfo/basic-types-metadata.rs | 8 | ||||
| -rw-r--r-- | src/test/debuginfo/option-like-enum.rs | 12 | ||||
| -rw-r--r-- | src/test/debuginfo/type-names.rs | 82 |
4 files changed, 53 insertions, 53 deletions
diff --git a/src/test/debuginfo/basic-types-globals-metadata.rs b/src/test/debuginfo/basic-types-globals-metadata.rs index 4251f22b291..e9f801c5f05 100644 --- a/src/test/debuginfo/basic-types-globals-metadata.rs +++ b/src/test/debuginfo/basic-types-globals-metadata.rs @@ -16,7 +16,7 @@ // gdb-command:whatis 'basic-types-globals-metadata::B' // gdb-check:type = bool // gdb-command:whatis 'basic-types-globals-metadata::I' -// gdb-check:type = int +// gdb-check:type = isize // gdb-command:whatis 'basic-types-globals-metadata::C' // gdb-check:type = char // gdb-command:whatis 'basic-types-globals-metadata::I8' @@ -28,7 +28,7 @@ // gdb-command:whatis 'basic-types-globals-metadata::I64' // gdb-check:type = i64 // gdb-command:whatis 'basic-types-globals-metadata::U' -// gdb-check:type = uint +// gdb-check:type = usize // gdb-command:whatis 'basic-types-globals-metadata::U8' // gdb-check:type = u8 // gdb-command:whatis 'basic-types-globals-metadata::U16' diff --git a/src/test/debuginfo/basic-types-metadata.rs b/src/test/debuginfo/basic-types-metadata.rs index 6aa228ec51b..5e2497043da 100644 --- a/src/test/debuginfo/basic-types-metadata.rs +++ b/src/test/debuginfo/basic-types-metadata.rs @@ -18,7 +18,7 @@ // gdb-command:whatis b // gdb-check:type = bool // gdb-command:whatis i -// gdb-check:type = int +// gdb-check:type = isize // gdb-command:whatis c // gdb-check:type = char // gdb-command:whatis i8 @@ -30,7 +30,7 @@ // gdb-command:whatis i64 // gdb-check:type = i64 // gdb-command:whatis u -// gdb-check:type = uint +// gdb-check:type = usize // gdb-command:whatis u8 // gdb-check:type = u8 // gdb-command:whatis u16 @@ -53,13 +53,13 @@ fn main() { let unit: () = (); let b: bool = false; - let i: int = -1; + let i: isize = -1; let c: char = 'a'; let i8: i8 = 68; let i16: i16 = -16; let i32: i32 = -32; let i64: i64 = -64; - let u: uint = 1; + let u: usize = 1; let u8: u8 = 100; let u16: u16 = 16; let u32: u32 = 32; diff --git a/src/test/debuginfo/option-like-enum.rs b/src/test/debuginfo/option-like-enum.rs index 333ad602cf1..71c235c878c 100644 --- a/src/test/debuginfo/option-like-enum.rs +++ b/src/test/debuginfo/option-like-enum.rs @@ -28,13 +28,13 @@ // gdb-check:$3 = {RUST$ENCODED$ENUM$1$Empty = {454545, 0x87654321, 9988}} // gdb-command:print empty_gdb->discr -// gdb-check:$4 = (int *) 0x0 +// gdb-check:$4 = (isize *) 0x0 // gdb-command:print droid // gdb-check:$5 = {RUST$ENCODED$ENUM$2$Void = {id = 675675, range = 10000001, internals = 0x43218765}} // gdb-command:print void_droid_gdb->internals -// gdb-check:$6 = (int *) 0x0 +// gdb-check:$6 = (isize *) 0x0 // gdb-command:continue @@ -81,25 +81,25 @@ // this case (by casting the value to a memory-equivalent struct). enum MoreFields<'a> { - Full(u32, &'a int, i16), + Full(u32, &'a isize, i16), Empty } struct MoreFieldsRepr<'a> { a: u32, - discr: &'a int, + discr: &'a isize, b: i16 } enum NamedFields<'a> { - Droid { id: i32, range: i64, internals: &'a int }, + Droid { id: i32, range: i64, internals: &'a isize }, Void } struct NamedFieldsRepr<'a> { id: i32, range: i64, - internals: &'a int + internals: &'a isize } fn main() { diff --git a/src/test/debuginfo/type-names.rs b/src/test/debuginfo/type-names.rs index aac5824af00..b508da73f4a 100644 --- a/src/test/debuginfo/type-names.rs +++ b/src/test/debuginfo/type-names.rs @@ -24,7 +24,7 @@ // gdb-check:type = struct GenericStruct<type-names::Mod1::Struct2, type-names::Mod1::Mod2::Struct3> // gdb-command:whatis generic_struct2 -// gdb-check:type = struct GenericStruct<type-names::Struct1, extern "fastcall" fn(int) -> uint> +// gdb-check:type = struct GenericStruct<type-names::Struct1, extern "fastcall" fn(isize) -> usize> // gdb-command:whatis mod_struct // gdb-check:type = struct Struct2 @@ -79,22 +79,22 @@ // RAW POINTERS // gdb-command:whatis mut_ptr1 -// gdb-check:type = struct (*mut type-names::Struct1, int) +// gdb-check:type = struct (*mut type-names::Struct1, isize) // gdb-command:whatis mut_ptr2 -// gdb-check:type = struct (*mut int, int) +// gdb-check:type = struct (*mut isize, isize) // gdb-command:whatis mut_ptr3 -// gdb-check:type = struct (*mut type-names::Mod1::Mod2::Enum3<type-names::Struct1>, int) +// gdb-check:type = struct (*mut type-names::Mod1::Mod2::Enum3<type-names::Struct1>, isize) // gdb-command:whatis const_ptr1 -// gdb-check:type = struct (*const type-names::Struct1, int) +// gdb-check:type = struct (*const type-names::Struct1, isize) // gdb-command:whatis const_ptr2 -// gdb-check:type = struct (*const int, int) +// gdb-check:type = struct (*const isize, isize) // gdb-command:whatis const_ptr3 -// gdb-check:type = struct (*const type-names::Mod1::Mod2::Enum3<type-names::Struct1>, int) +// gdb-check:type = struct (*const type-names::Mod1::Mod2::Enum3<type-names::Struct1>, isize) // VECTORS @@ -102,10 +102,10 @@ // gdb-check:type = struct ([type-names::Struct1; 3], i16) // gdb-command:whatis fixed_size_vec2 -// gdb-check:type = struct ([uint; 3], i16) +// gdb-check:type = struct ([usize; 3], i16) // gdb-command:whatis slice1 -// gdb-check:type = struct &[uint] +// gdb-check:type = struct &[usize] // gdb-command:whatis slice2 // gdb-check:type = struct &[type-names::Mod1::Enum2] @@ -128,50 +128,50 @@ // gdb-check:type = struct &Trait2<type-names::Struct1, type-names::Struct1> // gdb-command:whatis generic_mut_ref_trait -// gdb-check:type = struct &mut Trait2<type-names::Mod1::Mod2::Struct3, type-names::GenericStruct<uint, int>> +// gdb-check:type = struct &mut Trait2<type-names::Mod1::Mod2::Struct3, type-names::GenericStruct<usize, isize>> // BARE FUNCTIONS // gdb-command:whatis rust_fn -// gdb-check:type = struct (fn(core::option::Option<int>, core::option::Option<&type-names::Mod1::Struct2>), uint) +// gdb-check:type = struct (fn(core::option::Option<isize>, core::option::Option<&type-names::Mod1::Struct2>), usize) // gdb-command:whatis extern_c_fn -// gdb-check:type = struct (extern "C" fn(int), uint) +// gdb-check:type = struct (extern "C" fn(isize), usize) // gdb-command:whatis unsafe_fn -// gdb-check:type = struct (unsafe fn(core::result::Result<char, f64>), uint) +// gdb-check:type = struct (unsafe fn(core::result::Result<char, f64>), usize) // gdb-command:whatis extern_stdcall_fn -// gdb-check:type = struct (extern "stdcall" fn(), uint) +// gdb-check:type = struct (extern "stdcall" fn(), usize) // gdb-command:whatis rust_fn_with_return_value -// gdb-check:type = struct (fn(f64) -> uint, uint) +// gdb-check:type = struct (fn(f64) -> usize, usize) // gdb-command:whatis extern_c_fn_with_return_value -// gdb-check:type = struct (extern "C" fn() -> type-names::Struct1, uint) +// gdb-check:type = struct (extern "C" fn() -> type-names::Struct1, usize) // gdb-command:whatis unsafe_fn_with_return_value -// gdb-check:type = struct (unsafe fn(type-names::GenericStruct<u16, u8>) -> type-names::Mod1::Struct2, uint) +// gdb-check:type = struct (unsafe fn(type-names::GenericStruct<u16, u8>) -> type-names::Mod1::Struct2, usize) // gdb-command:whatis extern_stdcall_fn_with_return_value -// gdb-check:type = struct (extern "stdcall" fn(Box<int>) -> uint, uint) +// gdb-check:type = struct (extern "stdcall" fn(Box<isize>) -> usize, usize) // gdb-command:whatis generic_function_int -// gdb-check:type = struct (fn(int) -> int, uint) +// gdb-check:type = struct (fn(isize) -> isize, usize) // gdb-command:whatis generic_function_struct3 -// gdb-check:type = struct (fn(type-names::Mod1::Mod2::Struct3) -> type-names::Mod1::Mod2::Struct3, uint) +// gdb-check:type = struct (fn(type-names::Mod1::Mod2::Struct3) -> type-names::Mod1::Mod2::Struct3, usize) // gdb-command:whatis variadic_function -// gdb-check:type = struct (unsafe extern "C" fn(*const u8, ...) -> int, uint) +// gdb-check:type = struct (unsafe extern "C" fn(*const u8, ...) -> isize, usize) // CLOSURES // gdb-command:whatis closure1 -// gdb-check:type = struct (closure, uint) +// gdb-check:type = struct (closure, usize) // gdb-command:whatis closure2 -// gdb-check:type = struct (closure, uint) +// gdb-check:type = struct (closure, usize) #![omit_gdb_pretty_printer_section] @@ -183,7 +183,7 @@ struct GenericStruct<T1, T2>; enum Enum1 { Variant1_1, - Variant1_2(int) + Variant1_2(isize) } mod Mod1 { @@ -209,23 +209,23 @@ mod Mod1 { trait Trait1 { } trait Trait2<T1, T2> { } -impl Trait1 for int {} -impl<T1, T2> Trait2<T1, T2> for int {} +impl Trait1 for isize {} +impl<T1, T2> Trait2<T1, T2> for isize {} -fn rust_fn(_: Option<int>, _: Option<&Mod1::Struct2>) {} -extern "C" fn extern_c_fn(_: int) {} +fn rust_fn(_: Option<isize>, _: Option<&Mod1::Struct2>) {} +extern "C" fn extern_c_fn(_: isize) {} unsafe fn unsafe_fn(_: Result<char, f64>) {} extern "stdcall" fn extern_stdcall_fn() {} -fn rust_fn_with_return_value(_: f64) -> uint { 4 } +fn rust_fn_with_return_value(_: f64) -> usize { 4 } extern "C" fn extern_c_fn_with_return_value() -> Struct1 { Struct1 } unsafe fn unsafe_fn_with_return_value(_: GenericStruct<u16, u8>) -> Mod1::Struct2 { Mod1::Struct2 } -extern "stdcall" fn extern_stdcall_fn_with_return_value(_: Box<int>) -> uint { 0 } +extern "stdcall" fn extern_stdcall_fn_with_return_value(_: Box<isize>) -> usize { 0 } fn generic_function<T>(x: T) -> T { x } extern { - fn printf(_:*const u8, ...) -> int; + fn printf(_:*const u8, ...) -> isize; } // In many of the cases below, the type that is actually under test is wrapped @@ -240,7 +240,7 @@ fn main() { // Structs let simple_struct = Struct1; let generic_struct1: GenericStruct<Mod1::Struct2, Mod1::Mod2::Struct3> = GenericStruct; - let generic_struct2: GenericStruct<Struct1, extern "fastcall" fn(int) -> uint> = GenericStruct; + let generic_struct2: GenericStruct<Struct1, extern "fastcall" fn(isize) -> usize> = GenericStruct; let mod_struct = Mod1::Struct2; // Enums @@ -269,13 +269,13 @@ fn main() { let mut_ref2 = (&mut mut_generic_struct, 0i32); // Raw Pointers - let mut_ptr1: (*mut Struct1, int) = (ptr::null_mut(), 0); - let mut_ptr2: (*mut int, int) = (ptr::null_mut(), 0); - let mut_ptr3: (*mut Mod1::Mod2::Enum3<Struct1>, int) = (ptr::null_mut(), 0); + let mut_ptr1: (*mut Struct1, isize) = (ptr::null_mut(), 0); + let mut_ptr2: (*mut isize, isize) = (ptr::null_mut(), 0); + let mut_ptr3: (*mut Mod1::Mod2::Enum3<Struct1>, isize) = (ptr::null_mut(), 0); - let const_ptr1: (*const Struct1, int) = (ptr::null(), 0); - let const_ptr2: (*const int, int) = (ptr::null(), 0); - let const_ptr3: (*const Mod1::Mod2::Enum3<Struct1>, int) = (ptr::null(), 0); + let const_ptr1: (*const Struct1, isize) = (ptr::null(), 0); + let const_ptr2: (*const isize, isize) = (ptr::null(), 0); + let const_ptr3: (*const Mod1::Mod2::Enum3<Struct1>, isize) = (ptr::null(), 0); // Vectors let fixed_size_vec1 = ([Struct1, Struct1, Struct1], 0i16); @@ -297,7 +297,7 @@ fn main() { let mut generic_mut_ref_trait_impl = 0i; let generic_mut_ref_trait = (&mut generic_mut_ref_trait_impl) as - &mut Trait2<Mod1::Mod2::Struct3, GenericStruct<uint, int>>; + &mut Trait2<Mod1::Mod2::Struct3, GenericStruct<usize, isize>>; // Bare Functions let rust_fn = (rust_fn, 0u); @@ -310,7 +310,7 @@ fn main() { let unsafe_fn_with_return_value = (unsafe_fn_with_return_value, 0u); let extern_stdcall_fn_with_return_value = (extern_stdcall_fn_with_return_value, 0u); - let generic_function_int = (generic_function::<int>, 0u); + let generic_function_int = (generic_function::<isize>, 0u); let generic_function_struct3 = (generic_function::<Mod1::Mod2::Struct3>, 0u); let variadic_function = (printf, 0u); @@ -321,7 +321,7 @@ fn main() { // how that maps to rustc's internal representation of these forms. // Once closures have reached their 1.0 form, the tests below should // probably be expanded. - let closure1 = (|&: x:int| {}, 0u); + let closure1 = (|&: x:isize| {}, 0u); let closure2 = (|&: x:i8, y: f32| { (x as f32) + y }, 0u); zzz(); // #break |
