File tree Expand file tree Collapse file tree 1 file changed +0
-10
lines changed
compiler/rustc_hir_analysis/src/check Expand file tree Collapse file tree 1 file changed +0
-10
lines changed Original file line number Diff line number Diff 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 ! (
You can’t perform that action at this time.
0 commit comments