Skip to content

Commit 68f2029

Browse files
committed
a few more diagnostic items
1 parent e0d9924 commit 68f2029

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

alloc/src/borrow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ where
3131
/// implementing the `Clone` trait. But `Clone` works only for going from `&T`
3232
/// to `T`. The `ToOwned` trait generalizes `Clone` to construct owned data
3333
/// from any borrow of a given type.
34-
#[stable(feature = "rust1", since = "1.0.0")]
3534
#[cfg_attr(not(test), rustc_diagnostic_item = "ToOwned")]
35+
#[stable(feature = "rust1", since = "1.0.0")]
3636
pub trait ToOwned {
3737
/// The resulting type after obtaining ownership.
3838
#[stable(feature = "rust1", since = "1.0.0")]

alloc/src/string.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,7 @@ impl FromStr for String {
21742174
/// implementation for free.
21752175
///
21762176
/// [`Display`]: fmt::Display
2177+
#[cfg_attr(not(test), rustc_diagnostic_item = "ToString")]
21772178
#[stable(feature = "rust1", since = "1.0.0")]
21782179
pub trait ToString {
21792180
/// Converts the given value to a `String`.

std/src/ffi/os_str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub struct OsString {
9090
///
9191
/// [`&str`]: str
9292
/// [conversions]: super#conversions
93+
#[cfg_attr(not(test), rustc_diagnostic_item = "OsStr")]
9394
#[stable(feature = "rust1", since = "1.0.0")]
9495
// FIXME:
9596
// `OsStr::from_inner` current implementation relies

std/src/path.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,7 @@ impl AsRef<OsStr> for PathBuf {
17201720
/// let extension = path.extension();
17211721
/// assert_eq!(extension, Some(OsStr::new("txt")));
17221722
/// ```
1723+
#[cfg_attr(not(test), rustc_diagnostic_item = "Path")]
17231724
#[stable(feature = "rust1", since = "1.0.0")]
17241725
// FIXME:
17251726
// `Path::new` current implementation relies

0 commit comments

Comments
 (0)