@@ -282,6 +282,7 @@ unsafe impl<T: Clone> CloneToUninit for T {
282
282
283
283
// Specialized implementation for types that are [`Copy`], not just [`Clone`],
284
284
// and can therefore be copied bitwise.
285
+ #[ doc( hidden) ]
285
286
#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
286
287
unsafe impl < T : Copy > CloneToUninit for T {
287
288
unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
@@ -296,6 +297,7 @@ unsafe impl<T: Copy> CloneToUninit for T {
296
297
#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
297
298
unsafe impl < T : Clone > CloneToUninit for [ T ] {
298
299
#[ cfg_attr( debug_assertions, track_caller) ]
300
+ #[ inline]
299
301
default unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
300
302
let len = self . len ( ) ;
301
303
// This is the most likely mistake to make, so check it as a debug assertion.
@@ -323,9 +325,11 @@ unsafe impl<T: Clone> CloneToUninit for [T] {
323
325
}
324
326
}
325
327
328
+ #[ doc( hidden) ]
326
329
#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
327
330
unsafe impl < T : Copy > CloneToUninit for [ T ] {
328
331
#[ cfg_attr( debug_assertions, track_caller) ]
332
+ #[ inline]
329
333
unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
330
334
let len = self . len ( ) ;
331
335
// This is the most likely mistake to make, so check it as a debug assertion.
@@ -346,6 +350,7 @@ unsafe impl<T: Copy> CloneToUninit for [T] {
346
350
#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
347
351
unsafe impl CloneToUninit for str {
348
352
#[ cfg_attr( debug_assertions, track_caller) ]
353
+ #[ inline]
349
354
unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
350
355
// SAFETY: str is just a [u8] with UTF-8 invariant
351
356
unsafe { self . as_bytes ( ) . clone_to_uninit ( dst as * mut [ u8 ] ) }
0 commit comments