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

5 comments on commit bc81d27

@bors
Copy link
Contributor

@bors bors 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.

saw approval from bstrie
at huonw@bc81d27

@bors
Copy link
Contributor

@bors bors 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.

merging huonw/rust/const-eval = bc81d27 into auto

@bors
Copy link
Contributor

@bors bors 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.

huonw/rust/const-eval = bc81d27 merged ok, testing candidate = 18019a1

@bors
Copy link
Contributor

@bors bors 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.

@bors
Copy link
Contributor

@bors bors 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.

fast-forwarding incoming to auto = 18019a1

Please sign in to comment.