Fix overcapturing, unsafe extern blocks, and new unsafe ops

This commit is contained in:
Michael Goulet 2025-02-20 18:28:42 +00:00
parent 7f6873f64c
commit e1819a889a
7 changed files with 24 additions and 16 deletions

View file

@ -51,9 +51,13 @@ fn detect_llvm_link() -> (&'static str, &'static str) {
fn restore_library_path() {
let key = tracked_env_var_os("REAL_LIBRARY_PATH_VAR").expect("REAL_LIBRARY_PATH_VAR");
if let Some(env) = tracked_env_var_os("REAL_LIBRARY_PATH") {
env::set_var(&key, env);
unsafe {
env::set_var(&key, env);
}
} else {
env::remove_var(&key);
unsafe {
env::remove_var(&key);
}
}
}