diff --git a/src/env.rs b/src/env.rs index 510bbb0924..232797a68c 100644 --- a/src/env.rs +++ b/src/env.rs @@ -49,6 +49,8 @@ pub unsafe fn clearenv() -> std::result::Result<(), ClearEnvError> { } else { use std::env; for (name, _) in env::vars_os() { + // Ignore the lint due to Rust bug: https://github.com/rust-lang/rust/issues/125875 + #[allow(unsafe_op_in_unsafe_fn)] env::remove_var(name); } let ret = 0;