Skip to content

Commit dcf4546

Browse files
authored
Unrolled build for rust-lang#122855
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```
2 parents eff958c + 861e470 commit dcf4546

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ fn encode_ty<'tcx>(
525525
"{}",
526526
&len.try_to_scalar()
527527
.unwrap()
528-
.to_u64()
529-
.unwrap_or_else(|_| panic!("failed to convert length to u64"))
528+
.to_target_usize(&tcx.data_layout)
529+
.expect("Array lens are defined in usize")
530530
);
531531
s.push_str(&encode_ty(tcx, *ty0, dict, options));
532532
compress(dict, DictKey::Ty(ty, TyQ::None), &mut s);

0 commit comments

Comments
 (0)