@@ -269,6 +269,7 @@ pub unsafe trait CloneToUninit {
269269
270270#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
271271unsafe impl < T : Clone > CloneToUninit for T {
272+ #[ inline]
272273 default unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
273274 // SAFETY: The safety conditions of clone_to_uninit() are a superset of those of
274275 // ptr::write().
@@ -282,8 +283,10 @@ unsafe impl<T: Clone> CloneToUninit for T {
282283
283284// Specialized implementation for types that are [`Copy`], not just [`Clone`],
284285// and can therefore be copied bitwise.
286+ #[ doc( hidden) ]
285287#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
286288unsafe impl < T : Copy > CloneToUninit for T {
289+ #[ inline]
287290 unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
288291 // SAFETY: The safety conditions of clone_to_uninit() are a superset of those of
289292 // ptr::copy_nonoverlapping().
@@ -295,6 +298,7 @@ unsafe impl<T: Copy> CloneToUninit for T {
295298
296299#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
297300unsafe impl < T : Clone > CloneToUninit for [ T ] {
301+ #[ inline]
298302 #[ cfg_attr( debug_assertions, track_caller) ]
299303 default unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
300304 let len = self . len ( ) ;
@@ -323,8 +327,10 @@ unsafe impl<T: Clone> CloneToUninit for [T] {
323327 }
324328}
325329
330+ #[ doc( hidden) ]
326331#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
327332unsafe impl < T : Copy > CloneToUninit for [ T ] {
333+ #[ inline]
328334 #[ cfg_attr( debug_assertions, track_caller) ]
329335 unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
330336 let len = self . len ( ) ;
@@ -345,6 +351,7 @@ unsafe impl<T: Copy> CloneToUninit for [T] {
345351
346352#[ unstable( feature = "clone_to_uninit" , issue = "126799" ) ]
347353unsafe impl CloneToUninit for str {
354+ #[ inline]
348355 #[ cfg_attr( debug_assertions, track_caller) ]
349356 unsafe fn clone_to_uninit ( & self , dst : * mut Self ) {
350357 // SAFETY: str is just a [u8] with UTF-8 invariant
0 commit comments