mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
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
@ -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