From ebc36001c0b23689839e6a11c493f8c261d344da Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 26 Jul 2019 00:20:28 +0200 Subject: [PATCH] Add test for #43398 Closes #43398 --- src/test/ui/issues/issue-43398.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/issues/issue-43398.rs diff --git a/src/test/ui/issues/issue-43398.rs b/src/test/ui/issues/issue-43398.rs new file mode 100644 index 0000000000000..ae52e8f3f6b43 --- /dev/null +++ b/src/test/ui/issues/issue-43398.rs @@ -0,0 +1,15 @@ +// run-pass + +#![feature(core_intrinsics)] +#![feature(repr128)] + +#[repr(i128)] +enum Big { A, B } + +fn main() { + unsafe { + println!("{} {:?}", + std::intrinsics::discriminant_value(&Big::A), + std::mem::discriminant(&Big::B)); + } +}