@@ -1663,21 +1663,24 @@ impl Arc<dyn Any + Send + Sync> {
1663
1663
}
1664
1664
}
1665
1665
1666
- impl < Args , F : FnOnce < Args > + ?Sized + Copy > FnOnce < Args > for Arc < F > {
1666
+ #[ stable( feature = "arc_fn_impls" , since = "1.57.0" ) ]
1667
+ impl < Args , F : Fn < Args > + ?Sized > FnOnce < Args > for Arc < F > {
1667
1668
type Output = <F as FnOnce < Args > >:: Output ;
1668
1669
1669
1670
extern "rust-call" fn call_once ( self , args : Args ) -> Self :: Output {
1670
- <F as FnOnce < Args > >:: call_once ( * self , args)
1671
+ <F as Fn < Args > >:: call ( & self , args)
1671
1672
}
1672
1673
}
1673
1674
1674
- impl < Args , F : FnMut < Args > + ?Sized + Copy > FnMut < Args > for Arc < F > {
1675
+ #[ stable( feature = "arc_fn_impls" , since = "1.57.0" ) ]
1676
+ impl < Args , F : Fn < Args > + ?Sized > FnMut < Args > for Arc < F > {
1675
1677
extern "rust-call" fn call_mut ( & mut self , args : Args ) -> Self :: Output {
1676
- <F as FnMut < Args > >:: call_mut ( self , args)
1678
+ <F as Fn < Args > >:: call ( self , args)
1677
1679
}
1678
1680
}
1679
1681
1680
- impl < Args , F : Fn < Args > + ?Sized + Copy > Fn < Args > for Arc < F > {
1682
+ #[ stable( feature = "arc_fn_impls" , since = "1.57.0" ) ]
1683
+ impl < Args , F : Fn < Args > + ?Sized > Fn < Args > for Arc < F > {
1681
1684
extern "rust-call" fn call ( & self , args : Args ) -> Self :: Output {
1682
1685
<F as Fn < Args > >:: call ( self , args)
1683
1686
}
0 commit comments