Skip to content

Commit d719b5c

Browse files
committed
Provide a more useful message when failing to translate a const
1 parent 353ed4b commit d719b5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/comp/middle/trans.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6694,6 +6694,9 @@ fn trans_const_expr(&@crate_ctxt cx, @ast.expr e) -> ValueRef {
66946694
case (ast.expr_lit(?lit, ?ann)) {
66956695
ret trans_lit(cx, *lit, ann);
66966696
}
6697+
case (_) {
6698+
cx.sess.span_unimpl(e.span, "consts that's not a plain literal");
6699+
}
66976700
}
66986701
}
66996702

0 commit comments

Comments
 (0)