std::env::set_var has been marked unsafe in Rust 2024 because it’s not thread-safe (except on Windows).
var, vars, and the non-iter functions call set_var() without ensuring that the program is single-threaded. Since only the caller of these functions can check this invariant, we should remind them to do that by making them unsafe.