]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/callee.rs
rollup merge of #20594: nikomatsakis/orphan-ordered
[rust.git] / src / librustc_typeck / check / callee.rs
index 0bc76e1baab84b07cc3cf36742038ad22fa3bec2..b1dc033b567bbf659f58053bb30d68b553c33efe 100644 (file)
@@ -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
         }
         _ => {