Skip to content
Permalink
Browse files

Switch assertion order to be more helpful to ppl that encounter them

  • Loading branch information
oli-obk committed Jan 9, 2020
1 parent a4fa5bb commit c5c4fa8e7633c28464e3b27a57f2f175cc6700fd
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/librustc_mir/const_eval/eval_queries.rs
@@ -124,13 +124,13 @@ pub(super) fn op_to_const<'tcx>(
ConstValue::ByRef { alloc, offset: ptr.offset }
}
Scalar::Raw { data, .. } => {
assert!(mplace.layout.is_zst());
assert_eq!(
data,
mplace.layout.align.abi.bytes().into(),
"this MPlaceTy must come from `try_as_mplace` being used on a zst, so we know what
value this integer address must have",
);
assert!(mplace.layout.is_zst());
ConstValue::Scalar(Scalar::zst())
}
};

0 comments on commit c5c4fa8

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