remove assert

This commit is contained in:
Bastian Kauschke 2020-06-02 09:31:10 +02:00
parent 29508ce3ad
commit 4725af38bc
1 changed files with 1 additions and 2 deletions

View File

@ -251,8 +251,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for Search<'a, 'tcx> {
// fields of ADT.
let tcx = self.tcx();
for field_ty in adt_def.all_fields().map(|field| field.ty(tcx, substs)) {
assert!(!field_ty.needs_subst());
let ty = self.tcx().normalize_erasing_regions(ty::ParamEnv::reveal_all(), field_ty);
let ty = self.tcx().normalize_erasing_regions(ty::ParamEnv::empty(), field_ty);
debug!("structural-match ADT: field_ty={:?}, ty={:?}", field_ty, ty);
if ty.visit_with(self) {