]> git.lizzy.rs Git - rust.git/blobdiff - src/shims/dlsym.rs
Auto merge of #2162 - RalfJung:rustup, r=RalfJung
[rust.git] / src / shims / dlsym.rs
index e45556f9a1d135d2eeb3f18629ddbdb46ddb3e8b..05296d3a4eb70e47db8236c871fc701ee6e49eaa 100644 (file)
@@ -15,7 +15,7 @@ pub enum Dlsym {
 impl Dlsym {
     // Returns an error for unsupported symbols, and None if this symbol
     // should become a NULL pointer (pretend it does not exist).
-    pub fn from_str(name: &[u8], target_os: &str) -> InterpResult<'static, Option<Dlsym>> {
+    pub fn from_str<'tcx>(name: &[u8], target_os: &str) -> InterpResult<'tcx, Option<Dlsym>> {
         let name = &*String::from_utf8_lossy(name);
         Ok(match target_os {
             "linux" | "macos" => posix::Dlsym::from_str(name, target_os)?.map(Dlsym::Posix),
@@ -32,12 +32,15 @@ fn call_dlsym(
         dlsym: Dlsym,
         abi: Abi,
         args: &[OpTy<'tcx, Tag>],
-        ret: Option<(&PlaceTy<'tcx, Tag>, mir::BasicBlock)>,
+        dest: &PlaceTy<'tcx, Tag>,
+        ret: Option<mir::BasicBlock>,
     ) -> InterpResult<'tcx> {
         let this = self.eval_context_mut();
         match dlsym {
-            Dlsym::Posix(dlsym) => posix::EvalContextExt::call_dlsym(this, dlsym, abi, args, ret),
-            Dlsym::Windows(dlsym) => windows::EvalContextExt::call_dlsym(this, dlsym, abi, args, ret),
+            Dlsym::Posix(dlsym) =>
+                posix::EvalContextExt::call_dlsym(this, dlsym, abi, args, dest, ret),
+            Dlsym::Windows(dlsym) =>
+                windows::EvalContextExt::call_dlsym(this, dlsym, abi, args, dest, ret),
         }
     }
 }