From 24c04daea901b7a426db8fca2c743d0253986ab3 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 8 Nov 2024 12:19:52 -0500 Subject: [PATCH] Support dynamically sized field in error --- src/display.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display.rs b/src/display.rs index 7ccdd81..7b2bf1c 100644 --- a/src/display.rs +++ b/src/display.rs @@ -13,7 +13,7 @@ pub trait AsDisplay<'a>: Sealed { impl<'a, T> AsDisplay<'a> for &T where - T: Display + 'a, + T: Display + ?Sized + 'a, { type Target = &'a T; @@ -44,7 +44,7 @@ impl<'a> AsDisplay<'a> for PathBuf { #[doc(hidden)] pub trait Sealed {} -impl Sealed for &T {} +impl Sealed for &T {} #[cfg(feature = "std")] impl Sealed for Path {} #[cfg(feature = "std")]