From e87651c3f23e6ad63cc1ee359115ad72e50d3ba9 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Mon, 29 Jun 2020 11:23:49 +0200 Subject: [PATCH] Add test for SwitchInt on 128bit integers --- example/std_example.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/example/std_example.rs b/example/std_example.rs index 0c8fa8c0ba9..e0af1ff912b 100644 --- a/example/std_example.rs +++ b/example/std_example.rs @@ -111,6 +111,17 @@ fn main() { let kind = Nums::NegOne; assert_eq!(-1i128, kind as i128); + + let options = [1u128]; + match options[0] { + 1 => (), + 0 => loop {}, + v => panic(v), + }; +} + +fn panic(_: u128) { + panic!(); } #[target_feature(enable = "sse2")]