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 {
"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
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
register_diagnostics! {
+ // E0006 // merged with E0005
E0017,
E0022,
E0038,
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)
);