Skip to content

Commit fb00e60

Browse files
committed
Added assertion ensuring zero-sized type.
1 parent 418daa7 commit fb00e60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_trans/trans/expr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ pub fn trans_into<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
157157
if let hir::ExprPath(..) = expr.node {
158158
match bcx.def(expr.id) {
159159
Def::Const(_) | Def::AssociatedConst(_) => {
160+
assert!(type_is_zero_size(bcx.ccx(), bcx.tcx().node_id_to_type(expr.id)));
160161
return bcx;
161162
}
162163
_ => {}

0 commit comments

Comments
 (0)