From 163b97b7bb53b7a9753b5fbd9b28dc1e09337259 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 23 Jan 2013 16:29:31 -0800 Subject: librustc: Make C functions unsafe --- src/libstd/arena.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs index a669adc6dc8..7ac11ecc5cc 100644 --- a/src/libstd/arena.rs +++ b/src/libstd/arena.rs @@ -254,9 +254,13 @@ impl &Arena { // The external interface #[inline(always)] fn alloc(op: fn() -> T) -> &self/T { - if !rusti::needs_drop::() { - self.alloc_pod(op) - } else { self.alloc_nonpod(op) } + unsafe { + if !rusti::needs_drop::() { + self.alloc_pod(op) + } else { + self.alloc_nonpod(op) + } + } } } -- cgit 1.4.1-3-g733a5