Skip to content

Commit 3477645

Browse files
committed
dont debug-print allocations, that's too verbose
1 parent 2cef9e3 commit 3477645

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_middle/src/mir/interpret/allocation.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use provenance_map::*;
3030
/// module provides higher-level access.
3131
// Note: for performance reasons when interning, some of the `Allocation` fields can be partially
3232
// hashed. (see the `Hash` impl below for more details), so the impl is not derived.
33-
#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable)]
33+
#[derive(Clone, Eq, PartialEq, PartialOrd, Ord, TyEncodable, TyDecodable)]
3434
#[derive(HashStable)]
3535
pub struct Allocation<Prov = AllocId, Extra = ()> {
3636
/// The actual bytes of the allocation.
@@ -110,9 +110,9 @@ pub struct ConstAllocation<'tcx, Prov = AllocId, Extra = ()>(
110110

111111
impl<'tcx> fmt::Debug for ConstAllocation<'tcx> {
112112
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
113-
// This matches how `Allocation` is printed. We print it like this to
114-
// avoid having to update expected output in a lot of tests.
115-
write!(f, "{:?}", self.inner())
113+
// The debug-representation of this is very verbose and basically useless,
114+
// so don't print it.
115+
write!(f, "ConstAllocation {{ .. }}")
116116
}
117117
}
118118

0 commit comments

Comments
 (0)