Improve error message for non-exhaustive matches on non-exhaustive enums This pull request fixes #85227. For an enum marked with `#[non_exhaustive]` and not defined in the current crate, the error message for non-exhaustive matches now mentions the fact that the enum is marked as non-exhaustive: ``` error[E0004]: non-exhaustive patterns: `_` not covered --> main.rs:12:11 | 12 | match e { | ^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms = note: the matched value is of type `E`, which is marked as non-exhaustive ``` |
||
|---|---|---|
| .. | ||
| bootstrap | ||
| build_helper | ||
| ci | ||
| doc | ||
| etc | ||
| librustdoc | ||
| llvm-project@c78cf18a07 | ||
| rustdoc-json-types | ||
| test | ||
| tools | ||
| README.md | ||
| stage0.txt | ||
| version | ||
This directory contains the source code of the rust project, including:
- The test suite
- The bootstrapping build system
- Various submodules for tools, like rustdoc, rls, etc.
For more information on how various parts of the compiler work, see the rustc dev guide.