Skip to content

Commit 76990e4

Browse files
authored
Rollup merge of #94240 - compiler-errors:pathbuf-display, r=lcnr
Suggest calling .display() on `PathBuf` too Fixes #94210
2 parents f616cb0 + dd95fbe commit 76990e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ pub use macros::Debug;
728728
/// ```
729729
#[rustc_on_unimplemented(
730730
on(
731-
_Self = "std::path::Path",
731+
any(_Self = "std::path::Path", _Self = "std::path::PathBuf"),
732732
label = "`{Self}` cannot be formatted with the default formatter; call `.display()` on it",
733733
note = "call `.display()` or `.to_string_lossy()` to safely print paths, \
734734
as they may contain non-Unicode data"

0 commit comments

Comments
 (0)