Move E0006 into E0005

This commit is contained in:
Manish Goregaokar 2015-06-29 22:57:35 +05:30
parent 36d852918f
commit 688a09910a
2 changed files with 3 additions and 10 deletions

View file

@ -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,

View file

@ -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)
);