about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/diagnostics.rs11
-rw-r--r--src/librustc/middle/check_match.rs2
2 files changed, 3 insertions, 10 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs
index 0c3c9b2ec80..75d94cdffb1 100644
--- a/src/librustc/diagnostics.rs
+++ b/src/librustc/diagnostics.rs
@@ -72,7 +72,7 @@ fn foo(x: Option<String>) {
 E0003: r##"
 Not-a-Number (NaN) values cannot be compared for equality and hence can never
 match the input to a match expression. To match against NaN values, you should
-instead use the `is_nan()` method in a guard, like so: 
+instead use the `is_nan()` method in a guard, like so:
 
 ```
 match number {
@@ -96,7 +96,6 @@ underscore `_` wildcard pattern can be added after all other patterns to match
 "anything else".
 "##,
 
-// FIXME: Remove duplication here?
 E0005: r##"
 Patterns used to bind names must be irrefutable, that is, they must guarantee
 that a name will be extracted in all cases. If you encounter this error you
@@ -104,13 +103,6 @@ probably need to use a `match` or `if let` to deal with the possibility of
 failure.
 "##,
 
-E0006: r##"
-Patterns used to bind names must be irrefutable, that is, they must guarantee
-that a name will be extracted in all cases. If you encounter this error you
-probably need to use a `match` or `if let` to deal with the possibility of
-failure.
-"##,
-
 E0007: r##"
 This error indicates that the bindings in a match arm would require a value to
 be moved into more than one location, thus violating unique ownership. Code like
@@ -1262,6 +1254,7 @@ contain references (with a maximum lifetime of `'a`).
 
 
 register_diagnostics! {
+    // E0006 // merged with E0005
     E0017,
     E0022,
     E0038,
diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs
index d8c2341df2d..ea86fa318b4 100644
--- a/src/librustc/middle/check_match.rs
+++ b/src/librustc/middle/check_match.rs
@@ -1049,7 +1049,7 @@ fn check_fn(cx: &mut MatchCheckCtxt,
 
     for input in &decl.inputs {
         is_refutable(cx, &*input.pat, |pat| {
-            span_err!(cx.tcx.sess, input.pat.span, E0006,
+            span_err!(cx.tcx.sess, input.pat.span, E0005,
                 "refutable pattern in function argument: `{}` not covered",
                 pat_to_string(pat)
             );