We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fac5c9 commit 342309eCopy full SHA for 342309e
src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -1386,12 +1386,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
1386
let value = (i.as_u32() as u128)
1387
.wrapping_sub(niche_variants.start().as_u32() as u128)
1388
.wrapping_add(niche_start);
1389
- let value = truncate(value, discr.value.size(cx));
1390
- // NOTE(eddyb) do *NOT* remove this assert, until
1391
- // we pass the full 128-bit value to LLVM, otherwise
1392
- // truncation will be silent and remain undetected.
1393
- assert_eq!(value as u64 as u128, value);
1394
- Some(value as u64)
+ Some(truncate(value, niche.value.size(cx)))
1395
};
1396
1397
MemberDescription {
0 commit comments