X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_typeck%2Fcheck%2Fcallee.rs;h=b1dc033b567bbf659f58053bb30d68b553c33efe;hb=cf8a11e98bf3871cf3475913fd68187784b542a3;hp=0bc76e1baab84b07cc3cf36742038ad22fa3bec2;hpb=6e68fd09edc7ed37fd76f703247b5410cd338bfe;p=rust.git diff --git a/src/librustc_typeck/check/callee.rs b/src/librustc_typeck/check/callee.rs index 0bc76e1baab..b1dc033b567 100644 --- a/src/librustc_typeck/check/callee.rs +++ b/src/librustc_typeck/check/callee.rs @@ -111,7 +111,7 @@ fn try_overloaded_call_step<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, { // If the callee is a bare function or a closure, then we're all set. match structurally_resolved_type(fcx, callee_expr.span, adjusted_ty).sty { - ty::ty_bare_fn(..) | ty::ty_closure(_) => { + ty::ty_bare_fn(..) => { fcx.write_adjustment(callee_expr.id, callee_expr.span, ty::AdjustDerefRef(autoderefref)); @@ -158,8 +158,7 @@ fn confirm_builtin_call<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>, let error_fn_sig; let fn_sig = match callee_ty.sty { - ty::ty_bare_fn(_, &ty::BareFnTy {ref sig, ..}) | - ty::ty_closure(box ty::ClosureTy {ref sig, ..}) => { + ty::ty_bare_fn(_, &ty::BareFnTy {ref sig, ..}) => { sig } _ => {