about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-06-08 01:46:49 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2013-06-08 01:46:49 +1000
commitbc81d279fa04de7c956871ff6668d2a3d5e6d78c (patch)
treeaff940fe74a5660cb0bd1abbc3b6b4cafa05f0d1 /src
parent0d0c004b819f829f7401e74c339a7bbe596e0bdf (diff)
downloadrust-bc81d279fa04de7c956871ff6668d2a3d5e6d78c.tar.gz
rust-bc81d279fa04de7c956871ff6668d2a3d5e6d78c.zip
rustc: Convert a fail! to a useful error message.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/const_eval.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/middle/const_eval.rs b/src/librustc/middle/const_eval.rs
index 7e8e5bffb57..0327a8e81c7 100644
--- a/src/librustc/middle/const_eval.rs
+++ b/src/librustc/middle/const_eval.rs
@@ -242,7 +242,7 @@ pub enum const_val {
 pub fn eval_const_expr(tcx: middle::ty::ctxt, e: @expr) -> const_val {
     match eval_const_expr_partial(tcx, e) {
         Ok(ref r) => (/*bad*/copy *r),
-        Err(ref s) => fail!(/*bad*/copy *s)
+        Err(ref s) => tcx.sess.span_fatal(e.span, *s)
     }
 }