File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32
32
refs/heads/beta: 9854143cba679834bc4ef932858cd5303f015a0e
33
33
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
34
34
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35
- refs/heads/tmp: cdb10b884b3975dd897096e052f386f55cf0f4c9
35
+ refs/heads/tmp: 27b7841bb1261fb2d94a0ed6f2ec0a146a44783d
36
36
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
37
37
refs/tags/homu-tmp: 53a183f0274316596bf9405944d4f0468d8c93e4
38
38
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412
Original file line number Diff line number Diff line change @@ -1142,3 +1142,52 @@ pub trait FnOnce<Args> {
1142
1142
/// This is called when the call operator is used.
1143
1143
extern "rust-call" fn call_once ( self , args : Args ) -> Self :: Output ;
1144
1144
}
1145
+
1146
+ #[ cfg( not( stage0) ) ]
1147
+ mod impls {
1148
+ use marker:: Sized ;
1149
+ use super :: { Fn , FnMut , FnOnce } ;
1150
+
1151
+ impl < ' a , A , F : ?Sized > Fn < A > for & ' a F
1152
+ where F : Fn < A >
1153
+ {
1154
+ extern "rust-call" fn call ( & self , args : A ) -> F :: Output {
1155
+ ( * * self ) . call ( args)
1156
+ }
1157
+ }
1158
+
1159
+ impl < ' a , A , F : ?Sized > FnMut < A > for & ' a F
1160
+ where F : Fn < A >
1161
+ {
1162
+ extern "rust-call" fn call_mut ( & mut self , args : A ) -> F :: Output {
1163
+ ( * * self ) . call ( args)
1164
+ }
1165
+ }
1166
+
1167
+ impl < ' a , A , F : ?Sized > FnOnce < A > for & ' a F
1168
+ where F : Fn < A >
1169
+ {
1170
+ type Output = F :: Output ;
1171
+
1172
+ extern "rust-call" fn call_once ( self , args : A ) -> F :: Output {
1173
+ ( * self ) . call ( args)
1174
+ }
1175
+ }
1176
+
1177
+ impl < ' a , A , F : ?Sized > FnMut < A > for & ' a mut F
1178
+ where F : FnMut < A >
1179
+ {
1180
+ extern "rust-call" fn call_mut ( & mut self , args : A ) -> F :: Output {
1181
+ ( * self ) . call_mut ( args)
1182
+ }
1183
+ }
1184
+
1185
+ impl < ' a , A , F : ?Sized > FnOnce < A > for & ' a mut F
1186
+ where F : FnMut < A >
1187
+ {
1188
+ type Output = F :: Output ;
1189
+ extern "rust-call" fn call_once ( mut self , args : A ) -> F :: Output {
1190
+ ( * self ) . call_mut ( args)
1191
+ }
1192
+ }
1193
+ }
You can’t perform that action at this time.
0 commit comments