From: Bennet Bleßmann Date: Sun, 11 Aug 2024 19:53:02 +0000 (+0200) Subject: include the type name for better pin-pointing of the error source X-Git-Tag: v0.10.0~118^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=620bf385d171bf4f0c1150fad692b3e0b03b31a9;p=scryer-prolog.git include the type name for better pin-pointing of the error source - only done here as all other places are non-generic and the panic already includes file and line info, only here are we in a generic context and might need more differentiation --- diff --git a/src/raw_block.rs b/src/raw_block.rs index 8282a94d..da757415 100644 --- a/src/raw_block.rs +++ b/src/raw_block.rs @@ -43,7 +43,10 @@ impl RawBlock { let layout = alloc::Layout::from_size_align_unchecked(cap, T::align()); let new_base = alloc::alloc(layout).cast_const(); if new_base.is_null() { - panic!("failed to allocate for init_at_size"); + panic!( + "failed to allocate in init_at_size for {}", + std::any::type_name::() + ); } self.base = new_base; self.top = self.base.add(cap);