Add diagnostic item to CStr

This commit is contained in:
Mateusz Gacek 2021-05-18 15:33:38 +02:00
parent 25a277f03d
commit d730cc6646
2 changed files with 2 additions and 0 deletions

View File

@ -131,6 +131,7 @@ symbols! {
BinaryHeap, BinaryHeap,
Borrow, Borrow,
C, C,
CStr,
CString, CString,
Center, Center,
Clone, Clone,

View File

@ -185,6 +185,7 @@ pub struct CString {
/// ///
/// [`&str`]: prim@str /// [`&str`]: prim@str
#[derive(Hash)] #[derive(Hash)]
#[cfg_attr(not(test), rustc_diagnostic_item = "CStr")]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
// FIXME: // FIXME:
// `fn from` in `impl From<&CStr> for Box<CStr>` current implementation relies // `fn from` in `impl From<&CStr> for Box<CStr>` current implementation relies