Auto merge of #82338 - RalfJung:interp-error-allocs, r=oli-obk

all InterpError allocate now, so adjust alloc-error-check

Cc https://github.com/rust-lang/rust/pull/82116#discussion_r578310770
r? `@oli-obk`
This commit is contained in:
bors
2021-02-25 08:27:09 +00:00
4 changed files with 12 additions and 25 deletions

View File

@@ -466,8 +466,8 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
// an allocation, which we should avoid. When that happens,
// dedicated error variants should be introduced instead.
assert!(
!error.kind().allocates(),
"const-prop encountered allocating error: {}",
!error.kind().formatted_string(),
"const-prop encountered formatting error: {}",
error
);
None