3 matches across 1 files for error lang:Markdown path:compiler/rustc_error_codes/src/error_codes/E0004.md
snippet_mode: auto · sorted by relevance
compiler/rustc_error_codes/src/error_codes/E0004.md MARKDOWN 3 matches view file →
1This error indicates that the compiler cannot guarantee a matching pattern for
2one or more possible inputs to a match expression. Guaranteed matches are
3required in order to assign values to match expressions, or alternatively,
· · ·
14let x = Terminator::HastaLaVistaBaby;
15
16match x { // error: non-exhaustive patterns: `HastaLaVistaBaby` not covered
17 Terminator::TalkToMyHand => {}
18}
· · ·
19```
20
21If you encounter this error you must alter your patterns so that every possible
22value of the input type is matched. For types with a small number of variants
23(like enums) you should probably cover all cases explicitly. Alternatively, the
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.