@@ -250,29 +250,32 @@ pub trait FnOnce<Args> {
250
250
251
251
mod impls {
252
252
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
253
- impl < A , F : ?Sized > Fn < A > for & F
253
+ #[ rustc_const_unstable( feature = "const_fn_trait_ref_impls" , issue = "none" ) ]
254
+ impl < A , F : ?Sized > const Fn < A > for & F
254
255
where
255
- F : Fn < A > ,
256
+ F : ~ const Fn < A > ,
256
257
{
257
258
extern "rust-call" fn call ( & self , args : A ) -> F :: Output {
258
259
( * * self ) . call ( args)
259
260
}
260
261
}
261
262
262
263
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
263
- impl < A , F : ?Sized > FnMut < A > for & F
264
+ #[ rustc_const_unstable( feature = "const_fn_trait_ref_impls" , issue = "none" ) ]
265
+ impl < A , F : ?Sized > const FnMut < A > for & F
264
266
where
265
- F : Fn < A > ,
267
+ F : ~ const Fn < A > ,
266
268
{
267
269
extern "rust-call" fn call_mut ( & mut self , args : A ) -> F :: Output {
268
270
( * * self ) . call ( args)
269
271
}
270
272
}
271
273
272
274
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
273
- impl < A , F : ?Sized > FnOnce < A > for & F
275
+ #[ rustc_const_unstable( feature = "const_fn_trait_ref_impls" , issue = "none" ) ]
276
+ impl < A , F : ?Sized > const FnOnce < A > for & F
274
277
where
275
- F : Fn < A > ,
278
+ F : ~ const Fn < A > ,
276
279
{
277
280
type Output = F :: Output ;
278
281
@@ -282,19 +285,21 @@ mod impls {
282
285
}
283
286
284
287
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
285
- impl < A , F : ?Sized > FnMut < A > for & mut F
288
+ #[ rustc_const_unstable( feature = "const_fn_trait_ref_impls" , issue = "none" ) ]
289
+ impl < A , F : ?Sized > const FnMut < A > for & mut F
286
290
where
287
- F : FnMut < A > ,
291
+ F : ~ const FnMut < A > ,
288
292
{
289
293
extern "rust-call" fn call_mut ( & mut self , args : A ) -> F :: Output {
290
294
( * self ) . call_mut ( args)
291
295
}
292
296
}
293
297
294
298
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
295
- impl < A , F : ?Sized > FnOnce < A > for & mut F
299
+ #[ rustc_const_unstable( feature = "const_fn_trait_ref_impls" , issue = "none" ) ]
300
+ impl < A , F : ?Sized > const FnOnce < A > for & mut F
296
301
where
297
- F : FnMut < A > ,
302
+ F : ~ const FnMut < A > ,
298
303
{
299
304
type Output = F :: Output ;
300
305
extern "rust-call" fn call_once ( self , args : A ) -> F :: Output {
0 commit comments