about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCohenArthur <arthur.cohen@epita.fr>2020-08-28 12:20:24 +0200
committerCohenArthur <arthur.cohen@epita.fr>2020-08-28 12:20:24 +0200
commit9c848e19057fd3460bf703687ad371785032bac8 (patch)
tree540eb3a2ed3761543ed7d707f545654655e9b11e
parent4e685a512e66dfc5f66f49bc921cd77e1c9ab44a (diff)
downloadrust-9c848e19057fd3460bf703687ad371785032bac8.tar.gz
rust-9c848e19057fd3460bf703687ad371785032bac8.zip
fmt: Skip fn_sig_for_fn_abi()
-rw-r--r--src/abi/mod.rs12
1 files 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(