Rules / TAU-P005
No process exit or leaked values outside the edge
decided by Clippy kernel deny core deny edge –
Applies to tests: no
Exceptions:
#[expect] + reasonWhy
Exiting skips cleanup and hides control flow from callers; mem::forget silently leaks resources.
Fix
Return an error to the edge and let main decide the exit code; drop values normally.
What it checks
Lints: clippy::exit, clippy::mem_forget
Banned in kernel, core (process termination), 2 methods: std::process::exit, std::process::abort
Seen in fixtures
rej-exit/src/lib.rs core
//! Library code ending the process. /// Stops everything.pub fn stop() { std::process::exit(1);}$ cargo tauten check
error[TAU-P005]: usage of `process::exit` --> rej-exit/src/lib.rs:5:5 (core crate `rej-exit`) = rule: No process exit or leaked values outside the edge (decided by Clippy) = fix: Return an error to the edge and let `main` decide the exit code; drop values normally. error[TAU-P005]: use of a disallowed method `std::process::exit` --> rej-exit/src/lib.rs:5:5 (core crate `rej-exit`) = rule: No process exit or leaked values outside the edge (decided by Clippy) = fix: Return an error to the edge and let `main` decide the exit code; drop values normally.rej-exit (core) expects TAU-P005. Output captured at 0200db3.In the terminal
cargo tauten explain TAU-P005$ cargo tauten explain TAU-P005
TAU-P005: No process exit or leaked values outside the edge Why: Exiting skips cleanup and hides control flow from callers; mem::forget silently leaks resources. Fix: Return an error to the edge and let `main` decide the exit code; drop values normally. Decided by: ClippyDecides: No `process::exit` or `mem::forget` outside the edge.Sees: resolved; complete: yesDoes not see: Code expanded from macros defined in other crates (clippy skips it); code disabled by `cfg`; build scripts. APIs not on the tier's ban list (clippy.toml), including dependency functions that wrap a banned one; foreign code.Applies to tests: noExceptions allowed: with #[expect(.., reason)] kernel deny core deny edge -Lints: clippy::exit, clippy::mem_forgetBanned (process termination): std::process::exit, std::process::abort