Skip to content

Commit c13295b

Browse files
Add E0428 error explanation
1 parent 9581154 commit c13295b

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/librustc_resolve/diagnostics.rs

+18-1
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,24 @@ impl Foo for Bar {
380380
```
381381
"##,
382382

383+
E0428: r##"
384+
A type or module has been defined more than once. Example of erroneous
385+
code:
386+
387+
```
388+
struct Bar;
389+
struct Bar; // error: duplicate definition of value `Bar`
390+
```
391+
392+
Please verify you didn't mispelled the type/module's name or remove the
393+
duplicated one. Example:
394+
395+
```
396+
struct Bar;
397+
struct Bar2; // ok!
398+
```
399+
"##,
400+
383401
}
384402

385403
register_diagnostics! {
@@ -415,7 +433,6 @@ register_diagnostics! {
415433
E0425, // unresolved name
416434
E0426, // use of undeclared label
417435
E0427, // cannot use `ref` binding mode with ...
418-
E0428, // duplicate definition of ...
419436
E0429, // `self` imports are only allowed within a { } list
420437
E0430, // `self` import can only appear once in the list
421438
E0431, // `self` import can only appear in an import list with a non-empty

0 commit comments

Comments
 (0)