remove from impl block in std

This commit is contained in:
Jana Dönszelmann 2026-02-07 15:06:32 +01:00
parent f1b4c2a0e6
commit 9d6e120939
No known key found for this signature in database

View file

@ -103,6 +103,7 @@ use crate::vec::Vec;
/// and other memory errors.
#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone)]
#[rustc_diagnostic_item = "cstring_type"]
#[rustc_insignificant_dtor]
#[stable(feature = "alloc_c_string", since = "1.64.0")]
pub struct CString {
// Invariant 1: the slice ends with a zero byte and has a length of at least one.
@ -694,7 +695,6 @@ impl CString {
// memory-unsafe code from working by accident. Inline
// to prevent LLVM from optimizing it away in debug builds.
#[stable(feature = "cstring_drop", since = "1.13.0")]
#[rustc_insignificant_dtor]
impl Drop for CString {
#[inline]
fn drop(&mut self) {