rust/tests/ui/enum-discriminant/issue-43398.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
277 B
Rust
Raw Normal View History

2019-07-25 17:20:28 -05:00
// run-pass
#![feature(core_intrinsics)]
#![feature(repr128)]
//~^ WARN the feature `repr128` is incomplete
2019-07-25 17:20:28 -05:00
#[repr(i128)]
enum Big { A, B }
fn main() {
2019-10-25 05:03:34 -05:00
println!("{} {:?}",
std::intrinsics::discriminant_value(&Big::A),
std::mem::discriminant(&Big::B));
2019-07-25 17:20:28 -05:00
}