Rollup merge of #62994 - iluuu1994:test-for-43398, r=nikomatsakis

Add test for #43398

Closes #43398
This commit is contained in:
Mazdak Farrokhzad 2019-08-08 07:35:30 +02:00 committed by GitHub
commit 3a84c9db5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));
}
}