Skip to content

Commit d730cc6

Browse files
committed
Add diagnostic item to CStr
1 parent 25a277f commit d730cc6

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
@@ -131,6 +131,7 @@ symbols! {
131131
BinaryHeap,
132132
Borrow,
133133
C,
134+
CStr,
134135
CString,
135136
Center,
136137
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)