Skip to content

Commit 4725af3

Browse files
committed
remove assert
1 parent 29508ce commit 4725af3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_trait_selection/traits/structural_match.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for Search<'a, 'tcx> {
251251
// fields of ADT.
252252
let tcx = self.tcx();
253253
for field_ty in adt_def.all_fields().map(|field| field.ty(tcx, substs)) {
254-
assert!(!field_ty.needs_subst());
255-
let ty = self.tcx().normalize_erasing_regions(ty::ParamEnv::reveal_all(), field_ty);
254+
let ty = self.tcx().normalize_erasing_regions(ty::ParamEnv::empty(), field_ty);
256255
debug!("structural-match ADT: field_ty={:?}, ty={:?}", field_ty, ty);
257256

258257
if ty.visit_with(self) {

0 commit comments

Comments
 (0)