diff --git a/Cargo.lock b/Cargo.lock index 25f312fafb..99b7ccf69e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -791,9 +791,9 @@ checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" [[package]] name = "libloading" -version = "0.6.7" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" +checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" dependencies = [ "cfg-if", "winapi", @@ -1841,9 +1841,9 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" dependencies = [ "tinyvec", ] diff --git a/crates/proc_macro_srv/Cargo.toml b/crates/proc_macro_srv/Cargo.toml index 208489e0d3..6c8c289801 100644 --- a/crates/proc_macro_srv/Cargo.toml +++ b/crates/proc_macro_srv/Cargo.toml @@ -11,7 +11,7 @@ doctest = false [dependencies] object = { version = "0.23", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] } -libloading = "0.6.0" +libloading = "0.7.0" memmap2 = "0.2.0" tt = { path = "../tt", version = "0.0.0" } diff --git a/crates/proc_macro_srv/src/dylib.rs b/crates/proc_macro_srv/src/dylib.rs index 00fcc7bdf6..28a6ee5471 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 {