diff options
| author | Michael Goulet <michael@errs.io> | 2024-05-13 10:00:38 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-05-13 11:59:42 -0400 |
| commit | 3bcdf3058ef3eaef5042661cf8301acfbcddce65 (patch) | |
| tree | 3f91249a55f4a965a51ca35dce52e63b55aa398b /compiler/rustc_mir_transform | |
| parent | ecbe3fd550fccd2cba17ea7e86539bf3e0bfc618 (diff) | |
| download | rust-3bcdf3058ef3eaef5042661cf8301acfbcddce65.tar.gz rust-3bcdf3058ef3eaef5042661cf8301acfbcddce65.zip | |
split out AliasTy -> AliasTerm
Diffstat (limited to 'compiler/rustc_mir_transform')
| -rw-r--r-- | compiler/rustc_mir_transform/src/shim/async_destructor_ctor.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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 { |
