diff options
Diffstat (limited to 'src/test/run-fail/bug-2470-bounds-check-overflow.rs')
| -rw-r--r-- | src/test/run-fail/bug-2470-bounds-check-overflow.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/run-fail/bug-2470-bounds-check-overflow.rs b/src/test/run-fail/bug-2470-bounds-check-overflow.rs index e48d749d945..5e3da8476af 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow.rs +++ b/src/test/run-fail/bug-2470-bounds-check-overflow.rs @@ -22,13 +22,13 @@ fn main() { let x = vec!(1_usize,2_usize,3_usize); - let base = x.as_ptr() as uint; - let idx = base / mem::size_of::<uint>(); + let base = x.as_ptr() as usize; + let idx = base / mem::size_of::<usize>(); println!("ov1 base = 0x{:x}", base); println!("ov1 idx = 0x{:x}", idx); - println!("ov1 sizeof::<uint>() = 0x{:x}", mem::size_of::<uint>()); - println!("ov1 idx * sizeof::<uint>() = 0x{:x}", - idx * mem::size_of::<uint>()); + println!("ov1 sizeof::<usize>() = 0x{:x}", mem::size_of::<usize>()); + println!("ov1 idx * sizeof::<usize>() = 0x{:x}", + idx * mem::size_of::<usize>()); // This should panic. println!("ov1 0x{:x}", x[idx]); |
