X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_hir_typeck%2Fsrc%2Fcast.rs;h=890a068a7befc8c78cc14ad9d9c0d4fe96851cb7;hb=023b5136b597053f76941b54eeae668219e6e18d;hp=732b4bec58ed5cbd03a8a3df0c665a00fddd26c3;hpb=8a84dd8fcc434f820d66fdab26dd3cba3b0c59a9;p=rust.git diff --git a/compiler/rustc_hir_typeck/src/cast.rs b/compiler/rustc_hir_typeck/src/cast.rs index 732b4bec58e..890a068a7be 100644 --- a/compiler/rustc_hir_typeck/src/cast.rs +++ b/compiler/rustc_hir_typeck/src/cast.rs @@ -752,10 +752,7 @@ pub fn do_check(&self, fcx: &FnCtxt<'a, 'tcx>) -> Result { match *self.expr_ty.kind() { ty::FnDef(..) => { // Attempt a coercion to a fn pointer type. - let f = fcx.normalize_associated_types_in( - self.expr_span, - self.expr_ty.fn_sig(fcx.tcx), - ); + let f = fcx.normalize(self.expr_span, self.expr_ty.fn_sig(fcx.tcx)); let res = fcx.try_coerce( self.expr, self.expr_ty,