diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 1889e54933867..581c09e23dfa6 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -2321,7 +2321,9 @@ impl Path { } /// Returns an object that implements [`Display`] for safely printing paths - /// that may contain non-Unicode data. + /// that may contain non-Unicode data. This may perform lossy conversion, + /// depending on the platform. If you would like an implementation which + /// escapes the path please use [`Debug`] instead. /// /// [`Display`]: fmt::Display /// @@ -2555,7 +2557,9 @@ impl fmt::Debug for Path { /// /// A [`Path`] might contain non-Unicode data. This `struct` implements the /// [`Display`] trait in a way that mitigates that. It is created by the -/// [`display`](Path::display) method on [`Path`]. +/// [`display`](Path::display) method on [`Path`]. This may perform lossy +/// conversion, depending on the platform. If you would like an implementation +/// which escapes the path please use [`Debug`] instead. /// /// # Examples ///