]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/check_match.rs
Add part of new error codes in librustc
[rust.git] / src / librustc / middle / check_match.rs
index 8d592c9262958e26d4058c44416cdce7732b2906..bf2d2fee20e5b5ee7f1c2fc5a776ccdaacabf321 100644 (file)
@@ -282,9 +282,9 @@ fn check_for_static_nan(cx: &MatchCheckCtxt, pat: &Pat) {
 
                 Err(err) => {
                     let subspan = p.span.lo <= err.span.lo && err.span.hi <= p.span.hi;
-                    cx.tcx.sess.span_err(err.span,
-                                         &format!("constant evaluation error: {}",
-                                                  err.description()));
+                    span_err!(cx.tcx.sess, err.span, E0471,
+                              "constant evaluation error: {}",
+                              err.description());
                     if !subspan {
                         cx.tcx.sess.span_note(p.span,
                                               "in pattern here")