Skip to content

Commit 6606409

Browse files
---
yaml --- r: 224895 b: refs/heads/tmp c: 086a5c7 h: refs/heads/master i: 224893: 64ce5c0 224891: 47c425b 224887: 8c8f069 224879: 897317e 224863: 8fb2d30 224831: b17eb81 224767: be033ce v: v3
1 parent a946868 commit 6606409

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: 83dee3dfbb452a7558193f3ce171b3c60bf4a499
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 5429c9be78a0d55424a65244b956ea50e79c1f1e
28+
refs/heads/tmp: 086a5c74febf31650dff3ffbd7c2806056f02933
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e58601ab085591c71a27ae82137fc313222c2270
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/src/librustc_resolve/diagnostics.rs

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,39 @@ impl Bar {
397397
```
398398
"##,
399399

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+
400433
E0417: r##"
401434
A static variable was referenced in a pattern. Example of erroneous code:
402435
@@ -425,7 +458,7 @@ match 0 {
425458
```
426459
"##,
427460

428-
E0424: r##"
461+
E0423: r##"
429462
A `struct` variant name was used like a function name. Example of
430463
erroneous code:
431464
@@ -673,8 +706,6 @@ register_diagnostics! {
673706
E0410, // variable from pattern is not bound in pattern 1
674707
E0411, // use of `Self` outside of an impl or trait
675708
E0412, // use of undeclared
676-
E0413, // declaration of shadows an enum variant or unit-like struct in
677-
// scope
678709
E0414, // only irrefutable patterns allowed here
679710
E0415, // identifier is bound more than once in this parameter list
680711
E0416, // identifier is bound more than once in the same pattern

0 commit comments

Comments
 (0)