Provide a more useful message when failing to translate a const

This commit is contained in:
Marijn Haverbeke 2011-05-12 09:17:59 +02:00
parent 353ed4bdff
commit d719b5cae7

View file

@ -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");
}
}
}