about summary refs log tree commit diff
path: root/example
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-07-03 16:44:26 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2020-07-03 16:44:26 +0200
commit8d639cd778bb11fed2c230d8071664e24d30a84f (patch)
tree8a0939429e25296d5dcdd085b0d2964b29aa393b /example
parent4ada18fd77dd27da06a6233bf4b99c90e986b541 (diff)
downloadrust-8d639cd778bb11fed2c230d8071664e24d30a84f.tar.gz
rust-8d639cd778bb11fed2c230d8071664e24d30a84f.zip
Test signed 128bit discriminants
Diffstat (limited to 'example')
-rw-r--r--example/std_example.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/example/std_example.rs b/example/std_example.rs
index ebac391f1e5..0c8fa8c0ba9 100644
--- a/example/std_example.rs
+++ b/example/std_example.rs
@@ -103,6 +103,14 @@ fn main() {
     Box::pin(move |mut _task_context| {
         yield ();
     }).as_mut().resume(0);
+
+    #[derive(Copy, Clone)]
+    enum Nums {
+        NegOne = -1,
+    }
+
+    let kind = Nums::NegOne;
+    assert_eq!(-1i128, kind as i128);
 }
 
 #[target_feature(enable = "sse2")]