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 e7c49a7 commit da7b6b4Copy full SHA for da7b6b4
src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -1361,8 +1361,11 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
1361
let niche_value = if i == dataful_variant {
1362
None
1363
} else {
1364
- Some((i.wrapping_sub(*niche_variants.start()) as u128)
1365
- .wrapping_add(niche_start) as u64)
+ let niche = (i as u128)
+ .wrapping_sub(*niche_variants.start() as u128)
1366
+ .wrapping_add(niche_start);
1367
+ assert_eq!(niche as u64 as u128, niche);
1368
+ Some(niche as u64)
1369
};
1370
1371
MemberDescription {
0 commit comments