diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-06-29 11:23:49 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-07-16 13:01:20 +0200 |
| commit | e87651c3f23e6ad63cc1ee359115ad72e50d3ba9 (patch) | |
| tree | d30cc2fe46893583f4bd665dd041347368e5d1b0 /example/std_example.rs | |
| parent | 4a21cff957fd7f5fe2d4f27f19f39635157da067 (diff) | |
| download | rust-e87651c3f23e6ad63cc1ee359115ad72e50d3ba9.tar.gz rust-e87651c3f23e6ad63cc1ee359115ad72e50d3ba9.zip | |
Add test for SwitchInt on 128bit integers
Diffstat (limited to 'example/std_example.rs')
| -rw-r--r-- | example/std_example.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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")] |
