Skip to content

Commit 1207b7f

Browse files
authored
Rollup merge of #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 c1c4cd5 + d730cc6 commit 1207b7f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ symbols! {
132132
Borrow,
133133
Break,
134134
C,
135+
CStr,
135136
CString,
136137
Center,
137138
Clone,

library/std/src/ffi/c_str.rs

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