@@ -575,7 +575,8 @@ mod impls {
575
575
( $( $t: ty) * ) => {
576
576
$(
577
577
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
578
- impl Clone for $t {
578
+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
579
+ impl const Clone for $t {
579
580
#[ inline( always) ]
580
581
fn clone( & self ) -> Self {
581
582
* self
@@ -593,23 +594,26 @@ mod impls {
593
594
}
594
595
595
596
#[ unstable( feature = "never_type" , issue = "35121" ) ]
596
- impl Clone for ! {
597
+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
598
+ impl const Clone for ! {
597
599
#[ inline]
598
600
fn clone ( & self ) -> Self {
599
601
* self
600
602
}
601
603
}
602
604
603
605
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
604
- impl < T : PointeeSized > Clone for * const T {
606
+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
607
+ impl < T : PointeeSized > const Clone for * const T {
605
608
#[ inline( always) ]
606
609
fn clone ( & self ) -> Self {
607
610
* self
608
611
}
609
612
}
610
613
611
614
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
612
- impl < T : PointeeSized > Clone for * mut T {
615
+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
616
+ impl < T : PointeeSized > const Clone for * mut T {
613
617
#[ inline( always) ]
614
618
fn clone ( & self ) -> Self {
615
619
* self
@@ -618,7 +622,8 @@ mod impls {
618
622
619
623
/// Shared references can be cloned, but mutable references *cannot*!
620
624
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
621
- impl < T : PointeeSized > Clone for & T {
625
+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
626
+ impl < T : PointeeSized > const Clone for & T {
622
627
#[ inline( always) ]
623
628
#[ rustc_diagnostic_item = "noop_method_clone" ]
624
629
fn clone ( & self ) -> Self {
0 commit comments