Rollup merge of #85439 - mgacek8:add_diagnostic_item_to_CStr_type, r=davidtwco

Add diagnostic item to `CStr`

Required for clippy issue: https://github.com/rust-lang/rust-clippy/issues/7145
This commit is contained in:
Ralf Jung 2021-05-20 00:19:07 +02:00 committed by GitHub
commit 1207b7fa0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,7 @@ symbols! {
Borrow, Borrow,
Break, Break,
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