Skip to content
Permalink
Browse files

Ensure we don't accidentally turn non-zsts into zsts

  • Loading branch information
oli-obk committed Dec 26, 2019
1 parent 4fbe434 commit 23b0c470244e612206486bb51f687ef4f6b6e117
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/librustc_mir/const_eval/eval_queries.rs
@@ -125,6 +125,7 @@ pub(super) fn op_to_const<'tcx>(
}
Scalar::Raw { data, .. } => {
assert_eq!(data, mplace.layout.align.abi.bytes().into());
assert!(mplace.layout.is_zst());
ConstValue::Scalar(Scalar::zst())
}
};

0 comments on commit 23b0c47

Please sign in to comment.
You can’t perform that action at this time.