about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/numbers-arithmetic/signed-shift-const-eval.rs')
-rw-r--r--tests/ui/numbers-arithmetic/signed-shift-const-eval.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs
new file mode 100644
index 00000000000..6d0462b460e
--- /dev/null
+++ b/tests/ui/numbers-arithmetic/signed-shift-const-eval.rs
@@ -0,0 +1,8 @@
+// run-pass
+#![allow(non_camel_case_types)]
+
+
+enum test { thing = -5 >> 1_usize }
+pub fn main() {
+    assert_eq!(test::thing as isize, -3);
+}