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) {
258
258
/// Use closures allow captured values to be automatically used.
259
259
/// This is similar to have a closure that you would call `.use` over each captured value.
260
260
#[ unstable( feature = "ergonomic_clones" , issue = "132290" ) ]
261
+ #[ rustc_const_unstable( feature = "const_clone" , issue = "142757" ) ]
262
+ #[ const_trait]
261
263
#[ lang = "use_cloned" ]
262
- pub trait UseCloned : Clone {
264
+ pub trait UseCloned : ~ const Clone {
263
265
// Empty.
264
266
}
265
267
266
268
macro_rules! impl_use_cloned {
267
269
( $( $t: ty) * ) => {
268
270
$(
269
271
#[ 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 { }
271
274
) *
272
275
}
273
276
}
@@ -543,7 +546,8 @@ mod impls {
543
546
( $( $t: ty) * ) => {
544
547
$(
545
548
#[ 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 {
547
551
#[ inline( always) ]
548
552
fn clone( & self ) -> Self {
549
553
* self
You can’t perform that action at this time.
0 commit comments