Skip to main content
Run any Skill in Manus
with one click

rust-syntax-pattern-matching

Stars0
Forks0
UpdatedMay 19, 2026 at 23:19

Use when the user writes a `match`, `if let`, `let else`, `while let`, an if-let chain (edition 2024 stable in 1.88), destructures a struct/tuple/enum/slice/reference, uses `ref` / `ref mut`, guards, or or-patterns. Prevents non-exhaustive `match` on enums, missing the if-let chain idiom, accidentally moving instead of borrowing in match arms, and forgetting that `let else` requires the else branch to diverge. Covers: `match` exhaustiveness, arm order, wildcards `_`, `if let` and `if let else` chains, `let else` (1.65), `while let`, destructuring (tuple/struct/enum/slice/reference), `ref` and `ref mut`, or-patterns (`A | B`), guards (`if cond`), bindings (`name @ pattern`), `..` rest pattern, range patterns, literal patterns. Keywords: match, "if let", "let else", "while let", pattern, destructuring, ref, "ref mut", "or-pattern", "match guard", "match arm", exhaustiveness, "non-exhaustive", wildcard, "_", "@ binding", ".. rest pattern", "if let chain", "range pattern", "or pattern", "what is ref", "how to des

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

File Explorer
4 files
SKILL.md
readonly