Sparkle some attributes over CloneToUninit stuff · patricklam/verify-rust-std@26874cc (original) (raw)

`@@ -272,6 +272,7 @@ pub unsafe trait CloneToUninit {

`

272

272

``

273

273

`#[unstable(feature = "clone_to_uninit", issue = "126799")]

`

274

274

`unsafe impl<T: Clone> CloneToUninit for T {

`

``

275

`+

#[inline]

`

275

276

`default unsafe fn clone_to_uninit(&self, dst: *mut Self) {

`

276

277

`// SAFETY: The safety conditions of clone_to_uninit() are a superset of those of

`

277

278

`// ptr::write().

`

`@@ -285,8 +286,10 @@ unsafe impl<T: Clone> CloneToUninit for T {

`

285

286

``

286

287

`` // Specialized implementation for types that are [Copy], not just [Clone],

``

287

288

`// and can therefore be copied bitwise.

`

``

289

`+

#[doc(hidden)]

`

288

290

`#[unstable(feature = "clone_to_uninit", issue = "126799")]

`

289

291

`unsafe impl<T: Copy> CloneToUninit for T {

`

``

292

`+

#[inline]

`

290

293

`unsafe fn clone_to_uninit(&self, dst: *mut Self) {

`

291

294

`// SAFETY: The safety conditions of clone_to_uninit() are a superset of those of

`

292

295

`// ptr::copy_nonoverlapping().

`

`@@ -298,6 +301,7 @@ unsafe impl<T: Copy> CloneToUninit for T {

`

298

301

``

299

302

`#[unstable(feature = "clone_to_uninit", issue = "126799")]

`

300

303

`unsafe impl<T: Clone> CloneToUninit for [T] {

`

``

304

`+

#[inline]

`

301

305

`#[cfg_attr(debug_assertions, track_caller)]

`

302

306

`default unsafe fn clone_to_uninit(&self, dst: *mut Self) {

`

303

307

`let len = self.len();

`

`@@ -326,8 +330,10 @@ unsafe impl<T: Clone> CloneToUninit for [T] {

`

326

330

`}

`

327

331

`}

`

328

332

``

``

333

`+

#[doc(hidden)]

`

329

334

`#[unstable(feature = "clone_to_uninit", issue = "126799")]

`

330

335

`unsafe impl<T: Copy> CloneToUninit for [T] {

`

``

336

`+

#[inline]

`

331

337

`#[cfg_attr(debug_assertions, track_caller)]

`

332

338

`unsafe fn clone_to_uninit(&self, dst: *mut Self) {

`

333

339

`let len = self.len();

`

`@@ -348,6 +354,7 @@ unsafe impl<T: Copy> CloneToUninit for [T] {

`

348

354

``

349

355

`#[unstable(feature = "clone_to_uninit", issue = "126799")]

`

350

356

`unsafe impl CloneToUninit for str {

`

``

357

`+

#[inline]

`

351

358

`#[cfg_attr(debug_assertions, track_caller)]

`

352

359

`unsafe fn clone_to_uninit(&self, dst: *mut Self) {

`

353

360

`// SAFETY: str is just a [u8] with UTF-8 invariant

`