]> git.lizzy.rs Git - rust.git/blobdiff - crates/stdx/src/lib.rs
Remove proc macro management thread
[rust.git] / crates / stdx / src / lib.rs
index 18d5fadb9c52a428aa5d2bc80bee5ef9ea7676c1..e83d5db437d1d218d5fe3c3696e23790366b9de1 100644 (file)
@@ -110,7 +110,8 @@ fn drop(&mut self) {
     D(Some(f))
 }
 
-#[repr(transparent)]
+#[cfg_attr(not(target_arch = "wasm32"), repr(transparent))]
+#[derive(Debug)]
 pub struct JodChild(pub std::process::Child);
 
 impl ops::Deref for JodChild {
@@ -135,7 +136,10 @@ fn drop(&mut self) {
 
 impl JodChild {
     pub fn into_inner(self) -> std::process::Child {
-        // SAFETY: repr transparent
+        if cfg!(target_arch = "wasm32") {
+            panic!("no processes on wasm");
+        }
+        // SAFETY: repr transparent, except on WASM
         unsafe { std::mem::transmute::<JodChild, std::process::Child>(self) }
     }
 }