Skip to content

Commit 5957475

Browse files
Add E0419 error explanation
1 parent 6ae31b6 commit 5957475

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,33 @@ match 0 {
485485
```
486486
"##,
487487

488+
E0419: r##"
489+
An unknown enum variant, struct or const was used. Example of
490+
erroneous code:
491+
492+
```
493+
match 0 {
494+
Something::Foo => {} // error: unresolved enum variant, struct
495+
// or const `Foo`
496+
}
497+
```
498+
499+
Please verify you didn't misspell it or the enum variant, struct
500+
or const was well declared and/or imported. Example:
501+
502+
```
503+
enum Something {
504+
Foo,
505+
NotFoo,
506+
}
507+
508+
match Something::NotFoo {
509+
Something::Foo => {} // ok!
510+
_ => {}
511+
}
512+
```
513+
"##,
514+
488515
E0423: r##"
489516
A `struct` variant name was used like a function name. Example of
490517
erroneous code:
@@ -756,7 +783,6 @@ register_diagnostics! {
756783
E0415, // identifier is bound more than once in this parameter list
757784
E0416, // identifier is bound more than once in the same pattern
758785
E0418, // is not an enum variant, struct or const
759-
E0419, // unresolved enum variant, struct or const
760786
E0420, // is not an associated const
761787
E0421, // unresolved associated const
762788
E0422, // does not name a structure

0 commit comments

Comments
 (0)