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 c871bab commit 22223cfCopy full SHA for 22223cf
src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -1374,8 +1374,11 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
1374
let niche_value = if i == dataful_variant {
1375
None
1376
} else {
1377
- Some((i.wrapping_sub(*niche_variants.start()) as u128)
1378
- .wrapping_add(niche_start) as u64)
+ let niche = (i as u128)
+ .wrapping_sub(*niche_variants.start() as u128)
1379
+ .wrapping_add(niche_start);
1380
+ assert_eq!(niche as u64 as u128, niche);
1381
+ Some(niche as u64)
1382
};
1383
1384
MemberDescription {
0 commit comments