Uplift TypeRelation and Relate
This commit is contained in:
parent
ee47480f4c
commit
333458c2cb
27 changed files with 882 additions and 752 deletions
|
@ -554,8 +554,8 @@ fn coroutine_closure_to_certain_coroutine<'tcx>(
|
|||
goal_kind: ty::ClosureKind,
|
||||
goal_region: ty::Region<'tcx>,
|
||||
def_id: DefId,
|
||||
args: ty::CoroutineClosureArgs<'tcx>,
|
||||
sig: ty::CoroutineClosureSignature<'tcx>,
|
||||
args: ty::CoroutineClosureArgs<TyCtxt<'tcx>>,
|
||||
sig: ty::CoroutineClosureSignature<TyCtxt<'tcx>>,
|
||||
) -> Ty<'tcx> {
|
||||
sig.to_coroutine_given_kind_and_upvars(
|
||||
tcx,
|
||||
|
@ -578,8 +578,8 @@ fn coroutine_closure_to_ambiguous_coroutine<'tcx>(
|
|||
goal_kind: ty::ClosureKind,
|
||||
goal_region: ty::Region<'tcx>,
|
||||
def_id: DefId,
|
||||
args: ty::CoroutineClosureArgs<'tcx>,
|
||||
sig: ty::CoroutineClosureSignature<'tcx>,
|
||||
args: ty::CoroutineClosureArgs<TyCtxt<'tcx>>,
|
||||
sig: ty::CoroutineClosureSignature<TyCtxt<'tcx>>,
|
||||
) -> Ty<'tcx> {
|
||||
let upvars_projection_def_id = tcx.require_lang_item(LangItem::AsyncFnKindUpvars, None);
|
||||
let tupled_upvars_ty = Ty::new_projection(
|
||||
|
|
|
@ -295,7 +295,7 @@ pub fn coroutine_trait_ref_and_outputs<'tcx>(
|
|||
tcx: TyCtxt<'tcx>,
|
||||
fn_trait_def_id: DefId,
|
||||
self_ty: Ty<'tcx>,
|
||||
sig: ty::GenSig<'tcx>,
|
||||
sig: ty::GenSig<TyCtxt<'tcx>>,
|
||||
) -> (ty::TraitRef<'tcx>, Ty<'tcx>, Ty<'tcx>) {
|
||||
assert!(!self_ty.has_escaping_bound_vars());
|
||||
let trait_ref = ty::TraitRef::new(tcx, fn_trait_def_id, [self_ty, sig.resume_ty]);
|
||||
|
@ -306,7 +306,7 @@ pub fn future_trait_ref_and_outputs<'tcx>(
|
|||
tcx: TyCtxt<'tcx>,
|
||||
fn_trait_def_id: DefId,
|
||||
self_ty: Ty<'tcx>,
|
||||
sig: ty::GenSig<'tcx>,
|
||||
sig: ty::GenSig<TyCtxt<'tcx>>,
|
||||
) -> (ty::TraitRef<'tcx>, Ty<'tcx>) {
|
||||
assert!(!self_ty.has_escaping_bound_vars());
|
||||
let trait_ref = ty::TraitRef::new(tcx, fn_trait_def_id, [self_ty]);
|
||||
|
@ -317,7 +317,7 @@ pub fn iterator_trait_ref_and_outputs<'tcx>(
|
|||
tcx: TyCtxt<'tcx>,
|
||||
iterator_def_id: DefId,
|
||||
self_ty: Ty<'tcx>,
|
||||
sig: ty::GenSig<'tcx>,
|
||||
sig: ty::GenSig<TyCtxt<'tcx>>,
|
||||
) -> (ty::TraitRef<'tcx>, Ty<'tcx>) {
|
||||
assert!(!self_ty.has_escaping_bound_vars());
|
||||
let trait_ref = ty::TraitRef::new(tcx, iterator_def_id, [self_ty]);
|
||||
|
@ -328,7 +328,7 @@ pub fn async_iterator_trait_ref_and_outputs<'tcx>(
|
|||
tcx: TyCtxt<'tcx>,
|
||||
async_iterator_def_id: DefId,
|
||||
self_ty: Ty<'tcx>,
|
||||
sig: ty::GenSig<'tcx>,
|
||||
sig: ty::GenSig<TyCtxt<'tcx>>,
|
||||
) -> (ty::TraitRef<'tcx>, Ty<'tcx>) {
|
||||
assert!(!self_ty.has_escaping_bound_vars());
|
||||
let trait_ref = ty::TraitRef::new(tcx, async_iterator_def_id, [self_ty]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue