about summary refs log tree commit diff
path: root/library/std/src/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/path.rs')
-rw-r--r--library/std/src/path.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 6d6aa92711b..2ba3a9cdca2 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -2265,6 +2265,7 @@ impl Path {
     #[must_use = "this returns the result of the operation, \
                   without modifying the original"]
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[cfg_attr(not(test), rustc_diagnostic_item = "path_to_pathbuf")]
     pub fn to_path_buf(&self) -> PathBuf {
         PathBuf::from(self.inner.to_os_string())
     }