Skip to content

Commit be6990f

Browse files
committed
Address review comments
1 parent 15199fc commit be6990f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

std/src/ffi/c_str.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ use crate::sys;
109109
/// documentation of `CString` before use, as improper ownership management
110110
/// of `CString` instances can lead to invalid memory accesses, memory leaks,
111111
/// and other memory errors.
112+
112113
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone)]
114+
#[cfg_attr(not(test), rustc_diagnostic_item = "cstring_type")]
113115
#[stable(feature = "rust1", since = "1.0.0")]
114116
pub struct CString {
115117
// Invariant 1: the slice ends with a zero byte and has a length of at least one.

0 commit comments

Comments
 (0)