Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
26
tests/ui/structs-enums/enum-discrim-range-overflow.rs
Normal file
26
tests/ui/structs-enums/enum-discrim-range-overflow.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
// run-pass
|
||||
#![allow(overflowing_literals)]
|
||||
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
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() { }
|
Loading…
Add table
Add a link
Reference in a new issue