From 61092bd900bc2f117ecf436c182eeec57072a1df Mon Sep 17 00:00:00 2001 From: kjeremy Date: Thu, 11 Feb 2021 10:07:49 -0500 Subject: libloading 0.7 See https://docs.rs/libloading/0.7.0/libloading/changelog/r0_7_0/index.html --- crates/proc_macro_srv/src/dylib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/proc_macro_srv/src') diff --git a/crates/proc_macro_srv/src/dylib.rs b/crates/proc_macro_srv/src/dylib.rs index 00fcc7bdf..28a6ee547 100644 --- a/crates/proc_macro_srv/src/dylib.rs +++ b/crates/proc_macro_srv/src/dylib.rs @@ -60,7 +60,7 @@ fn find_registrar_symbol(file: &Path) -> io::Result> { /// It seems that on Windows that behaviour is default, so we do nothing in that case. #[cfg(windows)] fn load_library(file: &Path) -> Result { - Library::new(file) + unsafe { Library::new(file) } } #[cfg(unix)] @@ -71,7 +71,7 @@ fn load_library(file: &Path) -> Result { const RTLD_NOW: c_int = 0x00002; const RTLD_DEEPBIND: c_int = 0x00008; - UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) + unsafe { UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) } } struct ProcMacroLibraryLibloading { -- cgit v1.2.3