Skip to content

Commit 6f1221e

Browse files
committed
WIP: remove repr(C) check for a baseline crater run
1 parent 24d6a9a commit 6f1221e

File tree

1 file changed

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

1 file changed

+0
-10
lines changed

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,6 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)
15401540
enum UnsuitedReason {
15411541
NonExhaustive,
15421542
PrivateField,
1543-
ReprC,
15441543
}
15451544
struct UnsuitedInfo<'tcx> {
15461545
descr: &'static str,
@@ -1576,14 +1575,6 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)
15761575
});
15771576
}
15781577
}
1579-
if def.repr().c() {
1580-
return ControlFlow::Break(UnsuitedInfo {
1581-
descr: def.descr(),
1582-
def_id: def.did(),
1583-
args,
1584-
reason: UnsuitedReason::ReprC,
1585-
});
1586-
}
15871578
def.all_fields()
15881579
.map(|field| field.ty(tcx, args))
15891580
.try_for_each(|t| check_unsuited_1zst(tcx, t))
@@ -1609,7 +1600,6 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)
16091600
let note = match unsuited.reason {
16101601
UnsuitedReason::NonExhaustive => "is marked with `#[non_exhaustive]`",
16111602
UnsuitedReason::PrivateField => "contains private fields",
1612-
UnsuitedReason::ReprC => "is marked with `#[repr(C)]`",
16131603
};
16141604
let field_ty = tcx.def_path_str_with_args(unsuited.def_id, unsuited.args);
16151605
diag.note(format!(

0 commit comments

Comments
 (0)