rust/tests/ui/structs-enums/enum-discrim-range-overflow.rs
许杰友 Jieyou Xu (Joe) 95ff642797 tests: remove //@ pretty-expanded usages
Done with

```bash
sd '//@ pretty-expanded.*\n' '' tests/ui/**/*.rs
```

and

```
sd '//@pretty-expanded.*\n' '' tests/ui/**/*.rs
```
2024-11-26 02:50:48 +08:00

26 lines
411 B
Rust

//@ run-pass
#![allow(overflowing_literals)]
pub enum E64 {
H64 = 0x7FFF_FFFF_FFFF_FFFF,
L64 = 0x8000_0000_0000_0000
}
pub enum E32 {
H32 = 0x7FFF_FFFF,
L32 = 0x8000_0000
}
pub fn f(e64: E64, e32: E32) -> (bool,bool) {
(match e64 {
E64::H64 => true,
E64::L64 => false
},
match e32 {
E32::H32 => true,
E32::L32 => false
})
}
pub fn main() { }