File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1027,7 +1027,7 @@ fn adt_def(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::AdtDef<'_> {
1027
1027
let repr = if is_anonymous {
1028
1028
tcx. adt_def ( tcx. local_parent ( def_id) ) . repr ( )
1029
1029
} else {
1030
- tcx. repr_options_of_def ( def_id. to_def_id ( ) )
1030
+ tcx. repr_options_of_def ( def_id)
1031
1031
} ;
1032
1032
let ( kind, variants) = match & item. kind {
1033
1033
ItemKind :: Enum ( def, _) => {
Original file line number Diff line number Diff line change @@ -1472,15 +1472,16 @@ impl<'tcx> TyCtxt<'tcx> {
1472
1472
. filter ( move |item| item. kind == AssocKind :: Fn && item. defaultness ( self ) . has_value ( ) )
1473
1473
}
1474
1474
1475
- pub fn repr_options_of_def ( self , did : DefId ) -> ReprOptions {
1475
+ pub fn repr_options_of_def ( self , did : LocalDefId ) -> ReprOptions {
1476
1476
let mut flags = ReprFlags :: empty ( ) ;
1477
1477
let mut size = None ;
1478
1478
let mut max_align: Option < Align > = None ;
1479
1479
let mut min_pack: Option < Align > = None ;
1480
1480
1481
1481
// Generate a deterministically-derived seed from the item's path hash
1482
1482
// to allow for cross-crate compilation to actually work
1483
- let mut field_shuffle_seed = self . def_path_hash ( did) . 0 . to_smaller_hash ( ) . as_u64 ( ) ;
1483
+ let mut field_shuffle_seed =
1484
+ self . def_path_hash ( did. to_def_id ( ) ) . 0 . to_smaller_hash ( ) . as_u64 ( ) ;
1484
1485
1485
1486
// If the user defined a custom seed for layout randomization, xor the item's
1486
1487
// path hash with the user defined seed, this will allowing determinism while
You can’t perform that action at this time.
0 commit comments