Skip to content

Commit 67fcaaa

Browse files
committed
a few more diagnostic items
1 parent c6bb628 commit 67fcaaa

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

compiler/rustc_span/src/symbol.rs

+3
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,13 @@ symbols! {
169169
Option,
170170
Ord,
171171
Ordering,
172+
OsStr,
172173
OsString,
173174
Output,
174175
Param,
175176
PartialEq,
176177
PartialOrd,
178+
Path,
177179
PathBuf,
178180
Pending,
179181
Pin,
@@ -201,6 +203,7 @@ symbols! {
201203
Sync,
202204
Target,
203205
ToOwned,
206+
ToString,
204207
Try,
205208
Ty,
206209
TyCtxt,

library/alloc/src/borrow.rs

+1-1
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")]

library/alloc/src/string.rs

+1
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`.

library/std/src/ffi/os_str.rs

+1
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

library/std/src/path.rs

+1
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)