From 3477645a23bbb25b61d5e17d6d45a06821188876 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 6 Nov 2022 13:14:55 +0100 Subject: [PATCH] dont debug-print allocations, that's too verbose --- compiler/rustc_middle/src/mir/interpret/allocation.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_middle/src/mir/interpret/allocation.rs b/compiler/rustc_middle/src/mir/interpret/allocation.rs index ba64711ea28..62c822ae080 100644 --- a/compiler/rustc_middle/src/mir/interpret/allocation.rs +++ b/compiler/rustc_middle/src/mir/interpret/allocation.rs @@ -30,7 +30,7 @@ /// module provides higher-level access. // Note: for performance reasons when interning, some of the `Allocation` fields can be partially // hashed. (see the `Hash` impl below for more details), so the impl is not derived. -#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable)] +#[derive(Clone, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable)] #[derive(HashStable)] pub struct Allocation { /// The actual bytes of the allocation. @@ -110,9 +110,9 @@ pub struct ConstAllocation<'tcx, Prov = AllocId, Extra = ()>( impl<'tcx> fmt::Debug for ConstAllocation<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - // This matches how `Allocation` is printed. We print it like this to - // avoid having to update expected output in a lot of tests. - write!(f, "{:?}", self.inner()) + // The debug-representation of this is very verbose and basically useless, + // so don't print it. + write!(f, "ConstAllocation {{ .. }}") } }