File tree 2 files changed +6
-2
lines changed 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4916,7 +4916,9 @@ pub fn has_dtor(cx: &ctxt, struct_id: DefId) -> bool {
4916
4916
cx. destructor_for_type . borrow ( ) . contains_key ( & struct_id)
4917
4917
}
4918
4918
4919
- pub fn with_path < T > ( cx : & ctxt , id : ast:: DefId , f: |ast_map:: PathElems | -> T ) -> T {
4919
+ pub fn with_path < T , F > ( cx : & ctxt , id : ast:: DefId , f : F ) -> T where
4920
+ F : FnOnce ( ast_map:: PathElems ) -> T ,
4921
+ {
4920
4922
if id. krate == ast:: LOCAL_CRATE {
4921
4923
cx. map . with_path ( id. node , f)
4922
4924
} else {
Original file line number Diff line number Diff line change @@ -288,7 +288,9 @@ pub fn build_session_(sopts: config::Options,
288
288
}
289
289
290
290
// Seems out of place, but it uses session, so I'm putting it here
291
- pub fn expect < T > ( sess : & Session , opt : Option < T > , msg: || -> String ) -> T {
291
+ pub fn expect < T , M > ( sess : & Session , opt : Option < T > , msg : M ) -> T where
292
+ M : FnOnce ( ) -> String ,
293
+ {
292
294
diagnostic:: expect ( sess. diagnostic ( ) , opt, msg)
293
295
}
294
296
You can’t perform that action at this time.
0 commit comments