summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/eval-enum.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/eval-enum.rs')
-rw-r--r--tests/ui/consts/eval-enum.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/consts/eval-enum.rs b/tests/ui/consts/eval-enum.rs
new file mode 100644
index 000000000..551f10e66
--- /dev/null
+++ b/tests/ui/consts/eval-enum.rs
@@ -0,0 +1,10 @@
+enum Test {
+ DivZero = 1/0,
+ //~^ attempt to divide `1_isize` by zero
+ //~| ERROR evaluation of constant value failed
+ RemZero = 1%0,
+ //~^ attempt to calculate the remainder of `1_isize` with a divisor of zero
+ //~| ERROR evaluation of constant value failed
+}
+
+fn main() {}