Skip to content

Commit 8576733

Browse files
---
yaml --- r: 223246 b: refs/heads/auto c: 086a5c7 h: refs/heads/master v: v3
1 parent b7b73ef commit 8576733

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 5429c9be78a0d55424a65244b956ea50e79c1f1e
11+
refs/heads/auto: 086a5c74febf31650dff3ffbd7c2806056f02933
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/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)