auto merge of #6990 : huonw/rust/const-eval, r=bstrie

This fail! caused ICEs, but was trivial to convert to a useful error message.
This commit is contained in:
bors 2013-06-07 08:55:33 -07:00
commit 18019a1304
1 changed files with 1 additions and 1 deletions

View File

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