]> git.proxmox.com Git - rustc.git/blobdiff - library/backtrace/tests/accuracy/main.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / library / backtrace / tests / accuracy / main.rs
index a2aba071b3259f45d204a3a2fac8657a70603222..149203a1b6368535b1e24402eef65365f4352b49 100644 (file)
@@ -20,8 +20,6 @@ fn doit() {
     // Skip musl which is by default statically linked and doesn't support
     // dynamic libraries.
     !cfg!(target_env = "musl")
-    // Skip MinGW on libbacktrace which doesn't have support for DLLs.
-    && !(cfg!(windows) && cfg!(target_env = "gnu") && cfg!(feature = "libbacktrace"))
     // Skip Miri, since it doesn't support dynamic libraries.
     && !cfg!(miri)
     {
@@ -36,11 +34,13 @@ fn doit() {
         } else {
             dir.push("libdylib_dep.so");
         }
-        let lib = libloading::Library::new(&dir).unwrap();
-        let api = unsafe { lib.get::<extern "C" fn(Pos, fn(Pos, Pos))>(b"foo").unwrap() };
-        api(pos!(), |a, b| {
-            check!(a, b);
-        });
+        unsafe {
+            let lib = libloading::Library::new(&dir).unwrap();
+            let api = lib.get::<extern "C" fn(Pos, fn(Pos, Pos))>(b"foo").unwrap();
+            api(pos!(), |a, b| {
+                check!(a, b);
+            });
+        }
     }
 
     outer(pos!());