about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrea Nall <anall@andreanall.com>2021-02-16 02:32:21 +0000
committerAndrea Nall <anall@andreanall.com>2021-02-16 02:32:21 +0000
commit67fcaaaa7a9c393926e25db600a9976137425d68 (patch)
tree200bffeac102eef6010cfe328b8ce914991e8558
parentc6bb62810ae226b35e0181d8c4efc6d0377d196d (diff)
downloadrust-67fcaaaa7a9c393926e25db600a9976137425d68.tar.gz
rust-67fcaaaa7a9c393926e25db600a9976137425d68.zip
a few more diagnostic items
-rw-r--r--compiler/rustc_span/src/symbol.rs3
-rw-r--r--library/alloc/src/borrow.rs2
-rw-r--r--library/alloc/src/string.rs1
-rw-r--r--library/std/src/ffi/os_str.rs1
-rw-r--r--library/std/src/path.rs1
5 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 83b13e7d93c..1137a83bc77 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -169,11 +169,13 @@ symbols! {
         Option,
         Ord,
         Ordering,
+        OsStr,
         OsString,
         Output,
         Param,
         PartialEq,
         PartialOrd,
+        Path,
         PathBuf,
         Pending,
         Pin,
@@ -201,6 +203,7 @@ symbols! {
         Sync,
         Target,
         ToOwned,
+        ToString,
         Try,
         Ty,
         TyCtxt,
diff --git a/library/alloc/src/borrow.rs b/library/alloc/src/borrow.rs
index cec32251819..bdb2d67347e 100644
--- a/library/alloc/src/borrow.rs
+++ b/library/alloc/src/borrow.rs
@@ -31,8 +31,8 @@ where
 /// implementing the `Clone` trait. But `Clone` works only for going from `&T`
 /// to `T`. The `ToOwned` trait generalizes `Clone` to construct owned data
 /// from any borrow of a given type.
-#[stable(feature = "rust1", since = "1.0.0")]
 #[cfg_attr(not(test), rustc_diagnostic_item = "ToOwned")]
+#[stable(feature = "rust1", since = "1.0.0")]
 pub trait ToOwned {
     /// The resulting type after obtaining ownership.
     #[stable(feature = "rust1", since = "1.0.0")]
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs
index 3218b3535c9..00fd1c2908b 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -2174,6 +2174,7 @@ impl FromStr for String {
 /// implementation for free.
 ///
 /// [`Display`]: fmt::Display
+#[cfg_attr(not(test), rustc_diagnostic_item = "ToString")]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait ToString {
     /// Converts the given value to a `String`.
diff --git a/library/std/src/ffi/os_str.rs b/library/std/src/ffi/os_str.rs
index 6af5adf4cd8..13c8022820b 100644
--- a/library/std/src/ffi/os_str.rs
+++ b/library/std/src/ffi/os_str.rs
@@ -90,6 +90,7 @@ pub struct OsString {
 ///
 /// [`&str`]: str
 /// [conversions]: super#conversions
+#[cfg_attr(not(test), rustc_diagnostic_item = "OsStr")]
 #[stable(feature = "rust1", since = "1.0.0")]
 // FIXME:
 // `OsStr::from_inner` current implementation relies
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 759b233c7c1..afb28518b72 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -1720,6 +1720,7 @@ impl AsRef<OsStr> for PathBuf {
 /// let extension = path.extension();
 /// assert_eq!(extension, Some(OsStr::new("txt")));
 /// ```
+#[cfg_attr(not(test), rustc_diagnostic_item = "Path")]
 #[stable(feature = "rust1", since = "1.0.0")]
 // FIXME:
 // `Path::new` current implementation relies