diff options
author | kjeremy <[email protected]> | 2021-02-11 15:07:49 +0000 |
---|---|---|
committer | kjeremy <[email protected]> | 2021-02-11 15:07:49 +0000 |
commit | 61092bd900bc2f117ecf436c182eeec57072a1df (patch) | |
tree | 9ef49c32bcf1565b39ec624cf92624530f52ca5c /crates/proc_macro_srv | |
parent | b0f20a795d6b1f8d36d1cbe294e54ac592b98f5e (diff) |
libloading 0.7
See https://docs.rs/libloading/0.7.0/libloading/changelog/r0_7_0/index.html
Diffstat (limited to 'crates/proc_macro_srv')
-rw-r--r-- | crates/proc_macro_srv/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/dylib.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/proc_macro_srv/Cargo.toml b/crates/proc_macro_srv/Cargo.toml index 208489e0d..6c8c28980 100644 --- a/crates/proc_macro_srv/Cargo.toml +++ b/crates/proc_macro_srv/Cargo.toml | |||
@@ -11,7 +11,7 @@ doctest = false | |||
11 | 11 | ||
12 | [dependencies] | 12 | [dependencies] |
13 | object = { version = "0.23", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] } | 13 | object = { version = "0.23", default-features = false, features = ["std", "read_core", "elf", "macho", "pe"] } |
14 | libloading = "0.6.0" | 14 | libloading = "0.7.0" |
15 | memmap2 = "0.2.0" | 15 | memmap2 = "0.2.0" |
16 | 16 | ||
17 | tt = { path = "../tt", version = "0.0.0" } | 17 | 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 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<Option<String>> { | |||
60 | /// It seems that on Windows that behaviour is default, so we do nothing in that case. | 60 | /// It seems that on Windows that behaviour is default, so we do nothing in that case. |
61 | #[cfg(windows)] | 61 | #[cfg(windows)] |
62 | fn load_library(file: &Path) -> Result<Library, libloading::Error> { | 62 | fn load_library(file: &Path) -> Result<Library, libloading::Error> { |
63 | Library::new(file) | 63 | unsafe { Library::new(file) } |
64 | } | 64 | } |
65 | 65 | ||
66 | #[cfg(unix)] | 66 | #[cfg(unix)] |
@@ -71,7 +71,7 @@ fn load_library(file: &Path) -> Result<Library, libloading::Error> { | |||
71 | const RTLD_NOW: c_int = 0x00002; | 71 | const RTLD_NOW: c_int = 0x00002; |
72 | const RTLD_DEEPBIND: c_int = 0x00008; | 72 | const RTLD_DEEPBIND: c_int = 0x00008; |
73 | 73 | ||
74 | UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) | 74 | unsafe { UnixLibrary::open(Some(file), RTLD_NOW | RTLD_DEEPBIND).map(|lib| lib.into()) } |
75 | } | 75 | } |
76 | 76 | ||
77 | struct ProcMacroLibraryLibloading { | 77 | struct ProcMacroLibraryLibloading { |