Skip to content

Commit ece2bd9

Browse files
committed
bring back check for repr(C)
1 parent 134bed6 commit ece2bd9

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_hir_analysis/src/check

1 file changed

+3
-0
lines changed

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,9 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)
15561556
));
15571557
}
15581558
}
1559+
if def.repr().c() {
1560+
return ControlFlow::Break((def.descr(), def.did(), args, true));
1561+
}
15591562
def.all_fields()
15601563
.map(|field| field.ty(tcx, args))
15611564
.try_for_each(|t| check_non_exhaustive(tcx, typing_env, t))

0 commit comments

Comments
 (0)