Skip to content

Commit 050b8d3

Browse files
Add E0412 error explanation
1 parent cd0af45 commit 050b8d3

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,23 @@ impl Bar {
397397
```
398398
"##,
399399

400+
E0412: r##"
401+
An undeclared type name was used. Example of erroneous code:
402+
403+
```
404+
impl Something {} // error: use of undeclared type name `Something`
405+
```
406+
407+
To fix this error, please verify you didn't misspell the type name or
408+
you did declare it. Example:
409+
410+
```
411+
struct Something;
412+
413+
impl Something {}
414+
```
415+
"##,
416+
400417
E0413: r##"
401418
A declaration shadows an enum variant or unit-like struct in scope.
402419
Example of erroneous code:
@@ -725,7 +742,6 @@ register_diagnostics! {
725742
// pattern #1
726743
E0410, // variable from pattern is not bound in pattern 1
727744
E0411, // use of `Self` outside of an impl or trait
728-
E0412, // use of undeclared
729745
E0414, // only irrefutable patterns allowed here
730746
E0415, // identifier is bound more than once in this parameter list
731747
E0416, // identifier is bound more than once in the same pattern

0 commit comments

Comments
 (0)