Skip to content

Commit

Permalink
Unrolled build for rust-lang#122855
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122855 - workingjubilee:mangle-64-bit-chauvinism, r=compiler-errors

Fix Itanium mangling usizes

Arrays, surprisingly, are not sized to u64 on all platforms.

Fixes rust-lang#122851.

r? ```@compiler-errors```

cc ```@maurer```
  • Loading branch information
rust-timer authored Mar 22, 2024
2 parents eff958c + 861e470 commit dcf4546
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ fn encode_ty<'tcx>(
"{}",
&len.try_to_scalar()
.unwrap()
.to_u64()
.unwrap_or_else(|_| panic!("failed to convert length to u64"))
.to_target_usize(&tcx.data_layout)
.expect("Array lens are defined in usize")
);
s.push_str(&encode_ty(tcx, *ty0, dict, options));
compress(dict, DictKey::Ty(ty, TyQ::None), &mut s);
Expand Down

0 comments on commit dcf4546

Please sign in to comment.