From 8b7240e60bc9609e1efb0552d847dd2fa6af17d9 Mon Sep 17 00:00:00 2001 From: Dylan McKay Date: Sun, 9 Jun 2019 01:57:40 +1200 Subject: [PATCH] [AVR][HACK][NO UPSTREAM] Disable debug printing of function pointers Workaround for https://github.com/avr-rust/rust/issues/143. --- src/libcore/ptr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 4a7a16b2c94e0..e002052bf27bf 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -2624,14 +2624,14 @@ macro_rules! fnptr_impls_safety_abi { #[stable(feature = "fnptr_impls", since = "1.4.0")] impl fmt::Pointer for $FnTy { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Pointer::fmt(&(*self as *const ()), f) + "disabled due to avr-rust/rust#143".fmt(f) } } #[stable(feature = "fnptr_impls", since = "1.4.0")] impl fmt::Debug for $FnTy { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Pointer::fmt(&(*self as *const ()), f) + "disabled due to avr-rust/rust#143".fmt(f) } } }