diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/arena.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs index 3c316ecf5cc..6d8bc9fa0c3 100644 --- a/src/libstd/arena.rs +++ b/src/libstd/arena.rs @@ -37,9 +37,11 @@ impl arena for arena { end = n_bytes; } - let p = ptr::offset(ptr::addr_of(head.fill), start); - head.fill = end; - unsafe { ret unsafe::reinterpret_cast(p); } + unsafe { + let p = ptr::offset(vec::unsafe::to_ptr(head.data), start); + head.fill = end; + ret unsafe::reinterpret_cast(p); + } } } |
