We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5088592 + 010c2d8 commit 003a89fCopy full SHA for 003a89f
src/display.rs
@@ -2,7 +2,7 @@ use core::fmt::Display;
2
use std::path::{self, Path, PathBuf};
3
4
#[doc(hidden)]
5
-pub trait AsDisplay<'a> {
+pub trait AsDisplay<'a>: Sealed {
6
// TODO: convert to generic associated type.
7
// https://github.com/dtolnay/thiserror/pull/253
8
type Target: Display;
@@ -38,3 +38,9 @@ impl<'a> AsDisplay<'a> for PathBuf {
38
self.display()
39
}
40
41
+
42
+#[doc(hidden)]
43
+pub trait Sealed {}
44
+impl<T: Display> Sealed for &T {}
45
+impl Sealed for Path {}
46
+impl Sealed for PathBuf {}
0 commit comments