Provide a more useful message when failing to translate a const
This commit is contained in:
parent
353ed4bdff
commit
d719b5cae7
1 changed files with 3 additions and 0 deletions
|
|
@ -6694,6 +6694,9 @@ fn trans_const_expr(&@crate_ctxt cx, @ast.expr e) -> ValueRef {
|
|||
case (ast.expr_lit(?lit, ?ann)) {
|
||||
ret trans_lit(cx, *lit, ann);
|
||||
}
|
||||
case (_) {
|
||||
cx.sess.span_unimpl(e.span, "consts that's not a plain literal");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue