Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,12 @@ symbols! {
Option,
Ord,
Ordering,
OsString,
Output,
Param,
PartialEq,
PartialOrd,
PathBuf,
Pending,
Pin,
Poll,
Expand All @@ -198,6 +200,7 @@ symbols! {
StructuralPartialEq,
Sync,
Target,
ToOwned,
Try,
Ty,
TyCtxt,
Expand Down
1 change: 1 addition & 0 deletions library/alloc/src/borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ where
/// 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")]
pub trait ToOwned {
/// The resulting type after obtaining ownership.
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
1 change: 1 addition & 0 deletions library/alloc/src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ mod hack {
}

#[lang = "slice_alloc"]
#[cfg_attr(not(test), rustc_diagnostic_item = "slice")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure on this being slice -- I see the symbol was already there, but as far as I can tell wasn't being used anywhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. sym::slice is used in rustc_hir::lang_items::LangItem::Slice::name() but it doesn't really matter.

#[cfg(not(test))]
impl<T> [T] {
/// Sorts the slice.
Expand Down
1 change: 1 addition & 0 deletions library/std/src/ffi/os_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ use crate::sys_common::{AsInner, FromInner, IntoInner};
/// [`CStr`]: crate::ffi::CStr
/// [conversions]: super#conversions
#[derive(Clone)]
#[cfg_attr(not(test), rustc_diagnostic_item = "OsString")]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct OsString {
inner: Buf,
Expand Down
1 change: 1 addition & 0 deletions library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ impl FusedIterator for Ancestors<'_> {}
///
/// Which method works best depends on what kind of situation you're in.
#[derive(Clone)]
#[cfg_attr(not(test), rustc_diagnostic_item = "PathBuf")]
#[stable(feature = "rust1", since = "1.0.0")]
// FIXME:
// `PathBuf::as_mut_vec` current implementation relies
Expand Down