Skip to content

Commit d7a4c4d

Browse files
---
yaml --- r: 229300 b: refs/heads/try c: 378aba4 h: refs/heads/master v: v3
1 parent 19adffa commit d7a4c4d

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 4840c13f1ae38a6d6b2c3068a7a066ea4af30b11
4+
refs/heads/try: 378aba4743f8f26747829fd5da1ab1037ead11d9
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_resolve/diagnostics.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,26 @@ fn foo(f: i32, g: i32) {} // ok!
473473
```
474474
"##,
475475

476+
E0416: r##"
477+
An identifier is bound more than once in a pattern. Example of erroneous
478+
code:
479+
480+
```
481+
match (1, 2) {
482+
(x, x) => {} // error: identifier `x` is bound more than once in the
483+
// same pattern
484+
}
485+
```
486+
487+
Please verify you didn't misspell identifiers' name. Example:
488+
489+
```
490+
match (1, 2) {
491+
(x, y) => {} // ok!
492+
}
493+
```
494+
"##,
495+
476496
E0417: r##"
477497
A static variable was referenced in a pattern. Example of erroneous code:
478498
@@ -796,7 +816,6 @@ register_diagnostics! {
796816
E0410, // variable from pattern is not bound in pattern 1
797817
E0411, // use of `Self` outside of an impl or trait
798818
E0414, // only irrefutable patterns allowed here
799-
E0416, // identifier is bound more than once in the same pattern
800819
E0418, // is not an enum variant, struct or const
801820
E0420, // is not an associated const
802821
E0421, // unresolved associated const

0 commit comments

Comments
 (0)