]> git.lizzy.rs Git - rust.git/commitdiff
a few more diagnostic items
authorAndrea Nall <anall@andreanall.com>
Tue, 16 Feb 2021 02:32:21 +0000 (02:32 +0000)
committerAndrea Nall <anall@andreanall.com>
Tue, 16 Feb 2021 02:32:21 +0000 (02:32 +0000)
compiler/rustc_span/src/symbol.rs
library/alloc/src/borrow.rs
library/alloc/src/string.rs
library/std/src/ffi/os_str.rs
library/std/src/path.rs

index 83b13e7d93c11bfc49c38d7f2c291993acc466ee..1137a83bc77da57c6cabb8ea19753b07ec5b1dfb 100644 (file)
         Option,
         Ord,
         Ordering,
+        OsStr,
         OsString,
         Output,
         Param,
         PartialEq,
         PartialOrd,
+        Path,
         PathBuf,
         Pending,
         Pin,
         Sync,
         Target,
         ToOwned,
+        ToString,
         Try,
         Ty,
         TyCtxt,
index cec322518190eec1a97cf6d703173682862c70c6..bdb2d67347e432af641d67de844c57104da83be3 100644 (file)
@@ -31,8 +31,8 @@ fn borrow(&self) -> &B {
 /// 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")]
index 3218b3535c97027a43cc2b3da51ab67064cbbd66..00fd1c2908b82264ef4cae38f6c0ba888d1f9a5b 100644 (file)
@@ -2174,6 +2174,7 @@ fn from_str(s: &str) -> Result<String, Self::Err> {
 /// 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`.
index 6af5adf4cd860b693acb434be5b659bd6eef70e5..13c8022820bc3ed04057c776af19a1905d733859 100644 (file)
@@ -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
index 759b233c7c138b80bb0371c5e5e55002da2c3c41..afb28518b727d9773f65e44e893ed44bb2bfea81 100644 (file)
@@ -1720,6 +1720,7 @@ fn as_ref(&self) -> &OsStr {
 /// 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