mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
Try field type normalization instead of forcing it
This commit is contained in:
parent
4f9c30fb67
commit
d0afe6833d
@ -589,10 +589,10 @@ fn iter_fields<'tcx>(
|
||||
ty::Adt(def, substs) => {
|
||||
for (v_index, v_def) in def.variants().iter_enumerated() {
|
||||
for (f_index, f_def) in v_def.fields.iter().enumerate() {
|
||||
let field_ty = tcx.normalize_erasing_regions(
|
||||
ty::ParamEnv::reveal_all(),
|
||||
f_def.ty(tcx, substs),
|
||||
);
|
||||
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);
|
||||
f(Some(v_index), f_index.into(), field_ty);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user