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:
commit
18019a1304
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ pub enum const_val {
|
||||||
pub fn eval_const_expr(tcx: middle::ty::ctxt, e: @expr) -> const_val {
|
pub fn eval_const_expr(tcx: middle::ty::ctxt, e: @expr) -> const_val {
|
||||||
match eval_const_expr_partial(tcx, e) {
|
match eval_const_expr_partial(tcx, e) {
|
||||||
Ok(ref r) => (/*bad*/copy *r),
|
Ok(ref r) => (/*bad*/copy *r),
|
||||||
Err(ref s) => fail!(/*bad*/copy *s)
|
Err(ref s) => tcx.sess.span_fatal(e.span, *s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue