Skip to content

Commit

Permalink
rustc: Convert a fail! to a useful error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
huonw committed Jun 7, 2013
1 parent 0d0c004 commit bc81d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/middle/const_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

1 comment on commit bc81d27

@bstrie
Copy link

@bstrie bstrie commented on bc81d27 Jun 7, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.