1
Fork 0

split out AliasTy -> AliasTerm

This commit is contained in:
Michael Goulet 2024-05-13 10:00:38 -04:00
parent ecbe3fd550
commit 3bcdf3058e
70 changed files with 715 additions and 414 deletions

View file

@ -534,8 +534,7 @@ impl<'tcx> AsyncDestructorCtorShimBuilder<'tcx> {
}
// If projection of Discriminant then compare with `Ty::discriminant_ty`
if let ty::Alias(ty::AliasKind::Projection, ty::AliasTy { args, def_id, .. }) =
expected_ty.kind()
if let ty::Alias(ty::Projection, ty::AliasTy { args, def_id, .. }) = expected_ty.kind()
&& Some(*def_id) == self.tcx.lang_items().discriminant_type()
&& args.first().unwrap().as_type().unwrap().discriminant_ty(self.tcx) == operand_ty
{