File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -258,16 +258,19 @@ pub macro Clone($item:item) {
258258/// Use closures allow captured values to be automatically used.
259259/// This is similar to have a closure that you would call `.use` over each captured value.
260260#[ unstable( feature = "ergonomic_clones" , issue = "132290" ) ]
261+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
262+ #[ const_trait]
261263#[ lang = "use_cloned" ]
262- pub trait UseCloned : Clone {
264+ pub trait UseCloned : ~ const Clone {
263265 // Empty.
264266}
265267
266268macro_rules! impl_use_cloned {
267269 ( $( $t: ty) * ) => {
268270 $(
269271 #[ unstable( feature = "ergonomic_clones" , issue = "132290" ) ]
270- impl UseCloned for $t { }
272+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
273+ impl const UseCloned for $t { }
271274 ) *
272275 }
273276}
@@ -543,7 +546,8 @@ mod impls {
543546 ( $( $t: ty) * ) => {
544547 $(
545548 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
546- impl Clone for $t {
549+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
550+ impl const Clone for $t {
547551 #[ inline( always) ]
548552 fn clone( & self ) -> Self {
549553 * self
You can’t perform that action at this time.
0 commit comments