Skip to content

var, vars, and the non-iter functions should be marked unsafe #99

@delan

Description

@delan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions