]> git.lizzy.rs Git - rust.git/blob - tests/run-make/repr128-dwarf/lib.rs
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / run-make / repr128-dwarf / lib.rs
1 #![crate_type = "lib"]
2 #![feature(repr128)]
3
4 // Use .to_le() to ensure that the bytes are in the same order on both little- and big-endian
5 // platforms.
6
7 #[repr(u128)]
8 pub enum U128Enum {
9     U128A = 0_u128.to_le(),
10     U128B = 1_u128.to_le(),
11     U128C = (u64::MAX as u128 + 1).to_le(),
12     U128D = u128::MAX.to_le(),
13 }
14
15 #[repr(i128)]
16 pub enum I128Enum {
17     I128A = 0_i128.to_le(),
18     I128B = (-1_i128).to_le(),
19     I128C = i128::MIN.to_le(),
20     I128D = i128::MAX.to_le(),
21 }
22
23 pub fn f(_: U128Enum, _: I128Enum) {}