@@ -397,6 +397,39 @@ impl Bar {
397
397
```
398
398
"## ,
399
399
400
+ E0413 : r##"
401
+ A declaration shadows an enum variant or unit-like struct in scope.
402
+ Example of erroneous code:
403
+
404
+ ```
405
+ struct Foo;
406
+
407
+ let Foo = 12i32; // error: declaration of `Foo` shadows an enum variant or
408
+ // unit-like struct in scope
409
+ ```
410
+
411
+
412
+ To fix this error, you have to change the name of the declaration of the
413
+ shadowed object. Please also verify that neither name was misspelled.
414
+ Example:
415
+
416
+ ```
417
+ struct Foo;
418
+
419
+ let foo = 12i32; // ok!
420
+ ```
421
+
422
+ Or:
423
+
424
+ ```
425
+ struct FooStruct;
426
+
427
+ let Foo = 12i32; // ok!
428
+ ```
429
+
430
+ The goal here is to avoid a conflict of names.
431
+ "## ,
432
+
400
433
E0417 : r##"
401
434
A static variable was referenced in a pattern. Example of erroneous code:
402
435
@@ -425,7 +458,7 @@ match 0 {
425
458
```
426
459
"## ,
427
460
428
- E0424 : r##"
461
+ E0423 : r##"
429
462
A `struct` variant name was used like a function name. Example of
430
463
erroneous code:
431
464
@@ -673,8 +706,6 @@ register_diagnostics! {
673
706
E0410 , // variable from pattern is not bound in pattern 1
674
707
E0411 , // use of `Self` outside of an impl or trait
675
708
E0412 , // use of undeclared
676
- E0413 , // declaration of shadows an enum variant or unit-like struct in
677
- // scope
678
709
E0414 , // only irrefutable patterns allowed here
679
710
E0415 , // identifier is bound more than once in this parameter list
680
711
E0416 , // identifier is bound more than once in the same pattern
0 commit comments