CFI: Erase regions when projecting ADT to its transparent non-1zst field
This commit is contained in:
parent
a73bc4a131
commit
c8ae02fb84
2 changed files with 19 additions and 1 deletions
|
@ -146,7 +146,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for TransformTy<'tcx> {
|
|||
!is_zst
|
||||
});
|
||||
if let Some(field) = field {
|
||||
let ty0 = self.tcx.type_of(field.did).instantiate(self.tcx, args);
|
||||
let ty0 = self.tcx.erase_regions(field.ty(self.tcx, args));
|
||||
// Generalize any repr(transparent) user-defined type that is either a
|
||||
// pointer or reference, and either references itself or any other type that
|
||||
// contains or references itself, to avoid a reference cycle.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue