Skip to content

Commit 169c989

Browse files
Normalize transparent struct field type in CFI
1 parent 8ee2c66 commit 169c989

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi

1 file changed

+4
-1
lines changed

compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for TransformTy<'tcx> {
146146
!is_zst
147147
});
148148
if let Some(field) = field {
149-
let ty0 = self.tcx.erase_regions(field.ty(self.tcx, args));
149+
let ty0 = self.tcx.normalize_erasing_regions(
150+
ty::ParamEnv::reveal_all(),
151+
field.ty(self.tcx, args),
152+
);
150153
// Generalize any repr(transparent) user-defined type that is either a
151154
// pointer or reference, and either references itself or any other type that
152155
// contains or references itself, to avoid a reference cycle.

0 commit comments

Comments
 (0)