debuginfo: Generators use u32 as discriminant type repr

This commit is contained in:
Tomasz Miąsko 2020-03-05 00:00:00 +00:00
parent e54a16cffc
commit ebd941b890

View File

@ -1802,9 +1802,9 @@ fn prepare_enum_metadata(
DIB(cx),
name.as_ptr().cast(),
name.len(),
// FIXME: what if enumeration has i128 discriminant?
variant_index.as_usize() as i64,
false, // FIXME: IsUnsigned.
// Generators use u32 as discriminant type.
variant_index.as_u32().into(),
true, // IsUnsigned
))
}
})