From 9c848e19057fd3460bf703687ad371785032bac8 Mon Sep 17 00:00:00 2001 From: CohenArthur Date: Fri, 28 Aug 2020 12:20:24 +0200 Subject: [PATCH] fmt: Skip fn_sig_for_fn_abi() --- src/abi/mod.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/abi/mod.rs b/src/abi/mod.rs index c09c70175e5..fa91fef9eee 100644 --- a/src/abi/mod.rs +++ b/src/abi/mod.rs @@ -14,10 +14,8 @@ use crate::prelude::*; pub(crate) use self::returning::{can_return_to_ssa_var, codegen_return}; // Copied from https://github.com/rust-lang/rust/blob/f52c72948aa1dd718cc1f168d21c91c584c0a662/src/librustc_middle/ty/layout.rs#L2301 -pub(crate) fn fn_sig_for_fn_abi<'tcx>( - tcx: TyCtxt<'tcx>, - instance: Instance<'tcx>, -) -> ty::PolyFnSig<'tcx> { +#[rustfmt::skip] +pub(crate) fn fn_sig_for_fn_abi<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> ty::PolyFnSig<'tcx> { use rustc_middle::ty::subst::Subst; // FIXME(davidtwco,eddyb): A `ParamEnv` should be passed through to this function. @@ -73,10 +71,10 @@ pub(crate) fn fn_sig_for_fn_abi<'tcx>( let env_ty = tcx.mk_adt(pin_adt_ref, pin_substs); sig.map_bound(|sig| { - let state_did = - tcx.require_lang_item(rustc_hir::LangItem::GeneratorStateLangItem, None); + let state_did = tcx.require_lang_item(rustc_hir::LangItem::GeneratorStateLangItem, None); let state_adt_ref = tcx.adt_def(state_did); - let state_substs = tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]); + let state_substs = + tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]); let ret_ty = tcx.mk_adt(state_adt_ref, state_substs); tcx.mk_fn_sig(