Reformat using the new identifier sorting from rustfmt
This commit is contained in:
@@ -7,7 +7,7 @@ use rustc_type_ir::fold::TypeFoldable;
|
||||
use rustc_type_ir::inherent::*;
|
||||
use rustc_type_ir::lang_items::TraitSolverLangItem;
|
||||
use rustc_type_ir::visit::TypeVisitableExt as _;
|
||||
use rustc_type_ir::{self as ty, elaborate, Interner, Upcast as _};
|
||||
use rustc_type_ir::{self as ty, Interner, Upcast as _, elaborate};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::delegate::SolverDelegate;
|
||||
|
||||
@@ -7,7 +7,7 @@ use rustc_type_ir::data_structures::HashMap;
|
||||
use rustc_type_ir::fold::{TypeFoldable, TypeFolder, TypeSuperFoldable};
|
||||
use rustc_type_ir::inherent::*;
|
||||
use rustc_type_ir::lang_items::TraitSolverLangItem;
|
||||
use rustc_type_ir::{self as ty, elaborate, Interner, Upcast as _};
|
||||
use rustc_type_ir::{self as ty, Interner, Upcast as _, elaborate};
|
||||
use rustc_type_ir_macros::{TypeFoldable_Generic, TypeVisitable_Generic};
|
||||
use tracing::instrument;
|
||||
|
||||
@@ -507,11 +507,10 @@ pub(in crate::solve) fn extract_tupled_inputs_and_output_from_async_callable<I:
|
||||
// will project to the right upvars for the generator, appending the inputs and
|
||||
// coroutine upvars respecting the closure kind.
|
||||
nested.push(
|
||||
ty::TraitRef::new(
|
||||
cx,
|
||||
async_fn_kind_trait_def_id,
|
||||
[kind_ty, Ty::from_closure_kind(cx, goal_kind)],
|
||||
)
|
||||
ty::TraitRef::new(cx, async_fn_kind_trait_def_id, [
|
||||
kind_ty,
|
||||
Ty::from_closure_kind(cx, goal_kind),
|
||||
])
|
||||
.upcast(cx),
|
||||
);
|
||||
}
|
||||
@@ -617,18 +616,14 @@ fn coroutine_closure_to_ambiguous_coroutine<I: Interner>(
|
||||
sig: ty::CoroutineClosureSignature<I>,
|
||||
) -> I::Ty {
|
||||
let upvars_projection_def_id = cx.require_lang_item(TraitSolverLangItem::AsyncFnKindUpvars);
|
||||
let tupled_upvars_ty = Ty::new_projection(
|
||||
cx,
|
||||
upvars_projection_def_id,
|
||||
[
|
||||
I::GenericArg::from(args.kind_ty()),
|
||||
Ty::from_closure_kind(cx, goal_kind).into(),
|
||||
goal_region.into(),
|
||||
sig.tupled_inputs_ty.into(),
|
||||
args.tupled_upvars_ty().into(),
|
||||
args.coroutine_captures_by_ref_ty().into(),
|
||||
],
|
||||
);
|
||||
let tupled_upvars_ty = Ty::new_projection(cx, upvars_projection_def_id, [
|
||||
I::GenericArg::from(args.kind_ty()),
|
||||
Ty::from_closure_kind(cx, goal_kind).into(),
|
||||
goal_region.into(),
|
||||
sig.tupled_inputs_ty.into(),
|
||||
args.tupled_upvars_ty().into(),
|
||||
args.coroutine_captures_by_ref_ty().into(),
|
||||
]);
|
||||
sig.to_coroutine(
|
||||
cx,
|
||||
args.parent_args(),
|
||||
|
||||
Reference in New Issue
Block a user