This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
src/test/ui/feature-gates Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -102,17 +102,22 @@ LL | #[warn(non_exhaustive_omitted_patterns)]
102
102
error[E0004]: non-exhaustive patterns: `C` not covered
103
103
--> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:20:11
104
104
|
105
- LL | / enum Foo {
106
- LL | | A, B, C,
107
- | | - not covered
108
- LL | | }
109
- | |_____- `Foo` defined here
110
- ...
111
- LL | match Foo::A {
112
- | ^^^^^^ pattern `C` not covered
113
- |
114
- = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
105
+ LL | match Foo::A {
106
+ | ^^^^^^ pattern `C` not covered
107
+ |
108
+ note: `Foo` defined here
109
+ --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:12:15
110
+ |
111
+ LL | enum Foo {
112
+ | ---
113
+ LL | A, B, C,
114
+ | ^ not covered
115
115
= note: the matched value is of type `Foo`
116
+ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
117
+ |
118
+ LL ~ Foo::B => {}
119
+ LL + C => todo!()
120
+ |
116
121
117
122
error: aborting due to previous error; 10 warnings emitted
118
123
You can’t perform that action at this time.
0 commit comments