From 6a3756b0ba3dbab0c1957a7c829e09e9505c7574 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 14 Sep 2012 12:14:39 -0700 Subject: [PATCH] test: Use vec::as_imm_buf in bug-2470-bounds-check-overflow.rs --- src/test/run-fail/bug-2470-bounds-check-overflow.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 f35759639623..924b3dda1497 100644 --- a/src/test/run-fail/bug-2470-bounds-check-overflow.rs +++ b/src/test/run-fail/bug-2470-bounds-check-overflow.rs @@ -9,7 +9,7 @@ fn main() { // huge). let x = ~[1u,2u,3u]; - do vec::as_buf(x) |p, _len| { + do vec::as_imm_buf(x) |p, _len| { let base = p as uint; // base = 0x1230 say let idx = base / sys::size_of::(); // idx = 0x0246 say error!("ov1 base = 0x%x", base); @@ -21,4 +21,4 @@ fn main() { // This should fail. error!("ov1 0x%x", x[idx]); } -} \ No newline at end of file +}