From 14c846cb05ae00f6769e00c223b87fd8d43fef28 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Thu, 5 Oct 2023 15:50:36 +0000 Subject: [PATCH] Do not assert that hidden types don't have erased regions. --- compiler/rustc_trait_selection/src/traits/select/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 9b8853b42ab4e..8871de194a634 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -3116,9 +3116,6 @@ fn bind_generator_hidden_types_above<'tcx>( bty.instantiate(tcx, args) }) .collect(); - if considering_regions { - debug_assert!(!hidden_types.has_erased_regions()); - } let bound_vars = tcx.mk_bound_variable_kinds_from_iter(bound_vars.iter().chain( (num_bound_variables..counter).map(|_| ty::BoundVariableKind::Region(ty::BrAnon)),