Skip to content

Commit bc81d27

Browse files
committed
rustc: Convert a fail! to a useful error message.
1 parent 0d0c004 commit bc81d27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/const_eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pub enum const_val {
242242
pub fn eval_const_expr(tcx: middle::ty::ctxt, e: @expr) -> const_val {
243243
match eval_const_expr_partial(tcx, e) {
244244
Ok(ref r) => (/*bad*/copy *r),
245-
Err(ref s) => fail!(/*bad*/copy *s)
245+
Err(ref s) => tcx.sess.span_fatal(e.span, *s)
246246
}
247247
}
248248

0 commit comments

Comments
 (0)