From 3bcdf3058ef3eaef5042661cf8301acfbcddce65 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 13 May 2024 10:00:38 -0400 Subject: split out AliasTy -> AliasTerm --- compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_mir_transform') diff --git a/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs b/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs index 80eadb9abdc..ee820226ff3 100644 --- a/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs +++ b/compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs @@ -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 { -- cgit 1.4.1-3-g733a5