diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-01-09 12:03:37 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2020-01-09 12:04:15 +0100 |
| commit | c5c4fa8e7633c28464e3b27a57f2f175cc6700fd (patch) | |
| tree | fdbf8101d4a980c07799933743a1202f5bd989d9 | |
| parent | a4fa5bb6a0396b54a4519a20cd61c321905b5ac2 (diff) | |
| download | rust-c5c4fa8e7633c28464e3b27a57f2f175cc6700fd.tar.gz rust-c5c4fa8e7633c28464e3b27a57f2f175cc6700fd.zip | |
Switch assertion order to be more helpful to ppl that encounter them
| -rw-r--r-- | src/librustc_mir/const_eval/eval_queries.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/const_eval/eval_queries.rs b/src/librustc_mir/const_eval/eval_queries.rs index d2a0798249a..53f3b539bda 100644 --- a/src/librustc_mir/const_eval/eval_queries.rs +++ b/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()) } }; |
