mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
19 lines
424 B
Rust
19 lines
424 B
Rust
// run-pass
|
|
#![feature(repr128)]
|
|
//~^ WARN the feature `repr128` is incomplete
|
|
|
|
#[derive(PartialEq, Debug)]
|
|
#[repr(i128)]
|
|
enum Test {
|
|
A(Box<u64>) = 0,
|
|
B(usize) = u64::MAX as i128 + 1,
|
|
}
|
|
|
|
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.
|
|
}
|