mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 13:24:22 +00:00
rustc: Convert a fail! to a useful error message.
This commit is contained in:
parent
0d0c004b81
commit
bc81d279fa
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user