dont expect normalization to succeed in elaborate_drops
This commit is contained in:
parent
c14882f74e
commit
930c39aa8f
1 changed files with 9 additions and 3 deletions
|
@ -272,10 +272,16 @@ where
|
||||||
let field = FieldIdx::new(i);
|
let field = FieldIdx::new(i);
|
||||||
let subpath = self.elaborator.field_subpath(variant_path, field);
|
let subpath = self.elaborator.field_subpath(variant_path, field);
|
||||||
let tcx = self.tcx();
|
let tcx = self.tcx();
|
||||||
|
|
||||||
assert_eq!(self.elaborator.param_env().reveal(), Reveal::All);
|
assert_eq!(self.elaborator.param_env().reveal(), Reveal::All);
|
||||||
let field_ty =
|
|
||||||
tcx.normalize_erasing_regions(self.elaborator.param_env(), f.ty(tcx, substs));
|
let fty = f.ty(tcx, substs);
|
||||||
|
let field_ty = match tcx
|
||||||
|
.try_normalize_erasing_regions(self.elaborator.param_env(), f.ty(tcx, substs))
|
||||||
|
{
|
||||||
|
Ok(f_ty) => f_ty,
|
||||||
|
Err(_) => fty,
|
||||||
|
};
|
||||||
|
|
||||||
(tcx.mk_place_field(base_place, field, field_ty), subpath)
|
(tcx.mk_place_field(base_place, field, field_ty), subpath)
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue