We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c6760f commit 7636e07Copy full SHA for 7636e07
compiler/rustc_mir_dataflow/src/value_analysis.rs
@@ -589,10 +589,10 @@ fn iter_fields<'tcx>(
589
ty::Adt(def, substs) => {
590
for (v_index, v_def) in def.variants().iter_enumerated() {
591
for (f_index, f_def) in v_def.fields.iter().enumerate() {
592
- let field_ty = tcx.normalize_erasing_regions(
593
- ty::ParamEnv::reveal_all(),
594
- f_def.ty(tcx, substs),
595
- );
+ let field_ty = f_def.ty(tcx, substs);
+ let field_ty = tcx
+ .try_normalize_erasing_regions(ty::ParamEnv::reveal_all(), field_ty)
+ .unwrap_or(field_ty);
596
f(Some(v_index), f_index.into(), field_ty);
597
}
598
0 commit comments