summaryrefslogtreecommitdiffstats
path: root/src/test/ui/numbers-arithmetic/signed-shift-const-eval.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/numbers-arithmetic/signed-shift-const-eval.rs')
-rw-r--r--src/test/ui/numbers-arithmetic/signed-shift-const-eval.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/numbers-arithmetic/signed-shift-const-eval.rs b/src/test/ui/numbers-arithmetic/signed-shift-const-eval.rs
new file mode 100644
index 000000000..6d0462b46
--- /dev/null
+++ b/src/test/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);
+}