# Paths the deterministic core must never use. Clippy resolves paths, so a # listed path is caught under an alias or in a grouped import as well, for # example `fs::read` after `use std::{fs, env}`. Only the paths listed below # are checked. Everything else is the job of the text search in # core/tests/forbidden_apis.rs, which forbids grouped imports from `std` # because they hide module names from it. disallowed-types = [ { path = "std::collections::HashMap", reason = "iteration order differs between runs; use BTreeMap or Vec" }, { path = "std::collections::HashSet", reason = "iteration order differs between runs; use BTreeSet or Vec" }, { path = "std::hash::RandomState", reason = "seeded differently in every run" }, { path = "std::hash::DefaultHasher", reason = "seeded differently in every run" }, { path = "std::time::Instant", reason = "the core must not read the clock" }, { path = "std::time::SystemTime", reason = "the core must not read the clock" }, ] disallowed-methods = [ { path = "std::env::var", reason = "the core must not depend on the environment" }, { path = "std::env::args", reason = "the core must not depend on the environment" }, { path = "std::thread::spawn", reason = "the core must stay single-threaded" }, { path = "std::fs::read", reason = "the core must not touch files" }, { path = "std::fs::read_to_string", reason = "the core must not touch files" }, { path = "std::fs::write", reason = "the core must not touch files" }, { path = "std::fs::File::open", reason = "the core must not touch files" }, { path = "std::fs::File::create", reason = "the core must not touch files" }, { path = "std::process::exit", reason = "the core must not end the process" }, ]