2020-04-28 10:07:05 -05:00
|
|
|
// run-pass
|
2022-04-05 20:21:10 -05:00
|
|
|
#![feature(repr128)]
|
2020-10-03 08:47:28 -05:00
|
|
|
//~^ WARN the feature `repr128` is incomplete
|
2020-04-28 10:07:05 -05:00
|
|
|
|
|
|
|
#[derive(PartialEq, Debug)]
|
|
|
|
#[repr(i128)]
|
|
|
|
enum Test {
|
|
|
|
A(Box<u64>) = 0,
|
2020-06-02 02:59:11 -05:00
|
|
|
B(usize) = u64::MAX as i128 + 1,
|
2020-04-28 10:07:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_ne!(Test::A(Box::new(2)), Test::B(0));
|
|
|
|
// This previously caused a segfault.
|
|
|
|
//
|
|
|
|
// See https://github.com/rust-lang/rust/issues/70509#issuecomment-620654186
|
|
|
|
// for a detailed explanation.
|
|
|
|
}
|