From 377b0900aede976b2d37a499bbd7b62c2e39b358 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Wed, 27 May 2015 11:18:36 +0300 Subject: Use `const fn` to abstract away the contents of UnsafeCell & friends. --- src/libstd/dynamic_lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/dynamic_lib.rs') diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs index 8b90fce6fc4..ebdc049bc7f 100644 --- a/src/libstd/dynamic_lib.rs +++ b/src/libstd/dynamic_lib.rs @@ -211,8 +211,8 @@ mod dl { pub fn check_for_errors_in(f: F) -> Result where F: FnOnce() -> T, { - use sync::{StaticMutex, MUTEX_INIT}; - static LOCK: StaticMutex = MUTEX_INIT; + use sync::StaticMutex; + static LOCK: StaticMutex = StaticMutex::new(); unsafe { // dlerror isn't thread safe, so we need to lock around this entire // sequence -- cgit 1.4.1-3-g733a5