1 // compile-flags: -Z mir-opt-level=3
5 // This used to ICE: const-prop did not account for field reordering of scalar pairs,
6 // and would generate a tuple like `(0x1337, VariantBar): (FooEnum, isize)`,
7 // causing assertion failures in codegen when trying to read 0x1337 at the wrong type.
15 pub fn wrong_index() -> isize {
16 let (_, b) = id((FooEnum::VariantBar, 0x1337));
20 pub fn wrong_index_two() -> isize {
21 let (_, (_, b)) = id(((), (FooEnum::VariantBar, 0x1338)));