diff options
| author | Nathan Whitaker <nathan.whitaker01@gmail.com> | 2020-09-21 16:32:28 -0400 |
|---|---|---|
| committer | Nathan Whitaker <nathan.whitaker01@gmail.com> | 2020-10-26 18:19:48 -0400 |
| commit | 1bcd2452fe0abd1510b21cfa9aef19898a5c14fe (patch) | |
| tree | 3de94c385ad958dd42c35b04b292dd382bb00c49 /library/std/src/ffi | |
| parent | 737bfeffd2805f2372c934999afd8ea87921d835 (diff) | |
| download | rust-1bcd2452fe0abd1510b21cfa9aef19898a5c14fe.tar.gz rust-1bcd2452fe0abd1510b21cfa9aef19898a5c14fe.zip | |
Address review comments
Diffstat (limited to 'library/std/src/ffi')
| -rw-r--r-- | library/std/src/ffi/c_str.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/ffi/c_str.rs b/library/std/src/ffi/c_str.rs index a9ab0d1d83b..1cfd73863a6 100644 --- a/library/std/src/ffi/c_str.rs +++ b/library/std/src/ffi/c_str.rs @@ -109,7 +109,9 @@ use crate::sys; /// documentation of `CString` before use, as improper ownership management /// of `CString` instances can lead to invalid memory accesses, memory leaks, /// and other memory errors. + #[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone)] +#[cfg_attr(not(test), rustc_diagnostic_item = "cstring_type")] #[stable(feature = "rust1", since = "1.0.0")] pub struct CString { // Invariant 1: the slice ends with a zero byte and has a length of at least one. |
