about summary refs log tree commit diff
path: root/src/libcore/vec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/vec.rs')
-rw-r--r--src/libcore/vec.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index ad1c3f2344a..3215f3b9f28 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -1168,7 +1168,9 @@ mod unsafe {
     #[inline(always)]
     unsafe fn form_slice<T,U>(p: *T, len: uint, f: fn([T]/&) -> U) -> U {
         let pair = (p, len * sys::size_of::<T>());
-        let v : *([T]/&) = ::unsafe::reinterpret_cast(ptr::addr_of(pair));
+        // FIXME: should use &blk not &static here, but a snapshot is req'd
+        let v : *([T]/&static) =
+            ::unsafe::reinterpret_cast(ptr::addr_of(pair));
         f(*v)
     }
 }