rust-pattern-semantics

Installation
SKILL.md

Rust Pattern Semantics

Analysis order

For the pattern that the question or the error names, determine:

  1. The crate edition and the MSRV (rust-version in Cargo.toml). They decide which syntax compiles. See Version gates.
  2. Whether the scrutinee is a place or a value expression.
  3. The alternatives of each or-pattern.
  4. The default binding mode at each nesting level.
  5. Whether each binding is by value, ref, or ref mut, and which fields a partial move leaves initialized.
  6. When the guard runs, and whether it can run more than once.
  7. Where the scrutinee temporaries, the guard temporaries, and the bindings drop.

Do not propose a clone, a wildcard arm, or a ref keyword before this pass. Each one can compile and change what the code moves, borrows, or matches.

Installs
8
GitHub Stars
7
First Seen
Aug 20, 2026