Skip to content

Commit 9eadc76

Browse files
authored
Rollup merge of rust-lang#85439 - mgacek8:add_diagnostic_item_to_CStr_type, r=davidtwco
Add diagnostic item to `CStr` Required for clippy issue: rust-lang/rust-clippy#7145
2 parents 0c33cb2 + 727ac21 commit 9eadc76

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std/src/ffi/c_str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ pub struct CString {
185185
///
186186
/// [`&str`]: prim@str
187187
#[derive(Hash)]
188+
#[cfg_attr(not(test), rustc_diagnostic_item = "CStr")]
188189
#[stable(feature = "rust1", since = "1.0.0")]
189190
// FIXME:
190191
// `fn from` in `impl From<&CStr> for Box<CStr>` current implementation relies

0 commit comments

Comments
 (0)