Rules / TAU-K002
Kernel uses core/alloc paths
decided by Clippy kernel deny core – edge –
Applies to tests: no
Exceptions:
#[expect] + reasonWhy
Kernel crates are no_std; std paths hide the dependency.
Fix
Import from core:: or alloc::.
What it checks
Lints: clippy::std_instead_of_core, clippy::std_instead_of_alloc
Seen in fixtures
rej-kernel-std/src/lib.rs kernel
//! A kernel crate reaching `core` items through `std`.#![no_std]extern crate std; /// Compares two values.#[must_use]pub fn order(a: u8, b: u8) -> std::cmp::Ordering { a.cmp(&b)}$ cargo tauten check
error[TAU-K002]: used import from `std` instead of `core` --> rej-kernel-std/src/lib.rs:7:31 (kernel crate `rej-kernel-std`) = rule: Kernel uses core/alloc paths (decided by Clippy) = fix: Import from `core::` or `alloc::`.rej-kernel-std (kernel) expects TAU-K002. Output captured at 0200db3.In the terminal
cargo tauten explain TAU-K002$ cargo tauten explain TAU-K002
TAU-K002: Kernel uses core/alloc paths Why: Kernel crates are `no_std`; `std` paths hide the dependency. Fix: Import from `core::` or `alloc::`. Decided by: ClippyDecides: Kernel crates name `core`/`alloc` items through `core`/`alloc`.Sees: resolved; complete: yesDoes not see: Code expanded from macros defined in other crates (clippy skips it); code disabled by `cfg`; build scripts.Applies to tests: noExceptions allowed: with #[expect(.., reason)] kernel deny core - edge -Lints: clippy::std_instead_of_core, clippy::std_instead_of_alloc