Skip to content

Commit 2fe01bb

Browse files
committed
Mark accessing extern statics as unsafe.
This is required now due to rust-lang/rust#36247.
1 parent 9ac99d2 commit 2fe01bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ffi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ extern {
131131
}
132132

133133
pub fn dispatch_get_main_queue() -> dispatch_queue_t {
134-
&_dispatch_main_q as *const _ as dispatch_queue_t
134+
unsafe { &_dispatch_main_q as *const _ as dispatch_queue_t }
135135
}
136136

137137
pub const DISPATCH_QUEUE_SERIAL: dispatch_queue_attr_t = 0 as dispatch_queue_attr_t;
138-
pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = &_dispatch_queue_attr_concurrent;
138+
pub static DISPATCH_QUEUE_CONCURRENT: &'static dispatch_object_s = unsafe { &_dispatch_queue_attr_concurrent };
139139

140140
pub const DISPATCH_QUEUE_PRIORITY_HIGH: c_long = 2;
141141
pub const DISPATCH_QUEUE_PRIORITY_DEFAULT: c_long = 0;

0 commit comments

Comments
 (0)