about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorGnomedDev <david2005thomas@gmail.com>2024-09-18 21:09:06 +0100
committerGnomedDev <david2005thomas@gmail.com>2024-09-19 13:13:19 +0100
commit5e4716888a731cdd929bdbaf94eeb3e192f1eace (patch)
tree6977e3dda2c063307f24241ad5136d7b8cb8a62b /library/std/src
parent3ebff28f80cbbe5b51dd3d0edf8e5d0a8db1233f (diff)
downloadrust-5e4716888a731cdd929bdbaf94eeb3e192f1eace.tar.gz
rust-5e4716888a731cdd929bdbaf94eeb3e192f1eace.zip
[Clippy] Swap `option_as_ref_deref` to use diagnostic items instead of paths
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/ffi/os_str.rs1
-rw-r--r--library/std/src/path.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs
index 99bea676e12..8e1147338b0 100644
--- a/library/std/src/ffi/os_str.rs
+++ b/library/std/src/ffi/os_str.rs
@@ -196,6 +196,7 @@ impl OsString {
     /// let os_str = OsStr::new("foo");
     /// assert_eq!(os_string.as_os_str(), os_str);
     /// ```
+    #[cfg_attr(not(test), rustc_diagnostic_item = "os_string_as_os_str")]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[must_use]
     #[inline]
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index c94df9b5366..6d6aa92711b 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -1226,6 +1226,7 @@ impl PathBuf {
     /// let p = PathBuf::from("/test");
     /// assert_eq!(Path::new("/test"), p.as_path());
     /// ```
+    #[cfg_attr(not(test), rustc_diagnostic_item = "pathbuf_as_path")]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[must_use]
     #[inline]