From 2fe01bb291aa9d2513b07db3605c9a7e4467a217 Mon Sep 17 00:00:00 2001 From: Steven Sheldon Date: Sun, 8 Jan 2017 12:39:12 -0800 Subject: [PATCH] Mark accessing extern statics as unsafe. This is required now due to rust-lang/rust#36247. --- src/ffi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ffi.rs b/src/ffi.rs index d3636f8..a40cb0d 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -131,11 +131,11 @@ extern { } pub fn dispatch_get_main_queue() -> dispatch_queue_t { - &_dispatch_main_q as *const _ as dispatch_queue_t + unsafe { &_dispatch_main_q as *const _ as dispatch_queue_t } } pub const DISPATCH_QUEUE_SERIAL: dispatch_queue_attr_t = 0 as dispatch_queue_attr_t; -pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = &_dispatch_queue_attr_concurrent; +pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = unsafe { &_dispatch_queue_attr_concurrent }; pub const DISPATCH_QUEUE_PRIORITY_HIGH: c_long = 2; pub const DISPATCH_QUEUE_PRIORITY_DEFAULT: c_long = 0;