Rules / TAU-M001

No wildcard arms over enums you own

decided by Clippy kernel deny core deny edge warn
Applies to tests: no Exceptions: #[expect] + reason

Why

A _ arm silently absorbs variants added later; exhaustive matches turn a new variant into a compile error at every decision site.

Fix

List every variant. Group them with A | B => ... if they share behaviour.

What it checks

Lints: clippy::wildcard_enum_match_arm, clippy::match_wildcard_for_single_variants

Seen in fixtures

rej-wildcard/src/lib.rs core

//! Wildcard over an owned enum. /// A state.#[derive(Debug, Clone, Copy)]pub enum Mode {    /// a    Read,    /// b    Write,    /// c    Admin,} /// Whether the mode may write.#[must_use]pub const fn can_write(mode: Mode) -> bool {    match mode {        Mode::Write => true,        _ => false,    }}

$ cargo tauten check

error[TAU-M001]: wildcard match will also match any future added variants  --> rej-wildcard/src/lib.rs:19:9 (core crate `rej-wildcard`)  = rule: No wildcard arms over enums you own (decided by Clippy)  = fix: List every variant. Group them with `A | B => ...` if they share behaviour.
Fixture rej-wildcard (core) expects TAU-M001. Output captured at 0200db3.

In the terminal

cargo tauten explain TAU-M001

$ cargo tauten explain TAU-M001

TAU-M001: No wildcard arms over enums you own Why: A `_` arm silently absorbs variants added later; exhaustive matches turn a new variant into a compile error at every decision site. Fix: List every variant. Group them with `A | B => ...` if they share behaviour. Decided by: ClippyDecides: No wildcard arm in a `match` over an enum of the workspace.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 deny  edge warnLints: clippy::wildcard_enum_match_arm, clippy::match_wildcard_for_single_variants