Rollup merge of #121441 - lcnr:typesystem-cleanup, r=compiler-errors
`DefId` to `LocalDefId`
This commit is contained in:
commit
5401098ead
2 changed files with 4 additions and 3 deletions
|
@ -1472,7 +1472,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
.filter(move |item| item.kind == AssocKind::Fn && item.defaultness(self).has_value())
|
||||
}
|
||||
|
||||
pub fn repr_options_of_def(self, did: DefId) -> ReprOptions {
|
||||
pub fn repr_options_of_def(self, did: LocalDefId) -> ReprOptions {
|
||||
let mut flags = ReprFlags::empty();
|
||||
let mut size = None;
|
||||
let mut max_align: Option<Align> = None;
|
||||
|
@ -1480,7 +1480,8 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
|
||||
// Generate a deterministically-derived seed from the item's path hash
|
||||
// to allow for cross-crate compilation to actually work
|
||||
let mut field_shuffle_seed = self.def_path_hash(did).0.to_smaller_hash().as_u64();
|
||||
let mut field_shuffle_seed =
|
||||
self.def_path_hash(did.to_def_id()).0.to_smaller_hash().as_u64();
|
||||
|
||||
// If the user defined a custom seed for layout randomization, xor the item's
|
||||
// path hash with the user defined seed, this will allowing determinism while
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue