Support dynamically sized field in error

This commit is contained in:
David Tolnay 2024-11-08 12:19:52 -05:00
parent 8e8e27376c
commit 24c04daea9
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82

View file

@ -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<T: Display> Sealed for &T {}
impl<T: Display + ?Sized> Sealed for &T {}
#[cfg(feature = "std")]
impl Sealed for Path {}
#[cfg(feature = "std")]