about summary refs log tree commit diff
path: root/src/tools/rustdoc-js/tester.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-14 06:53:45 +0000
committerbors <bors@rust-lang.org>2021-05-14 06:53:45 +0000
commit69b352ef7749825abde2d8f8e31c05f681e61a10 (patch)
tree23aa88b23815441ecfe796f1c152fd3caa0c23e7 /src/tools/rustdoc-js/tester.js
parent91f2e2d21820ff9946f27aa743911d7344caa0e0 (diff)
parent57291b8c5eea1ac59d5c54e65358b8dd56639c31 (diff)
downloadrust-69b352ef7749825abde2d8f8e31c05f681e61a10.tar.gz
rust-69b352ef7749825abde2d8f8e31c05f681e61a10.zip
Auto merge of #85233 - FabianWolff:issue-85227, r=petrochenkov
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
```
Diffstat (limited to 'src/tools/rustdoc-js/tester.js')
0 files changed, 0 insertions, 0 deletions