summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-negative.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-negative.rs')
-rw-r--r--tests/ui/consts/const-negative.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/consts/const-negative.rs b/tests/ui/consts/const-negative.rs
new file mode 100644
index 000000000..1cb560936
--- /dev/null
+++ b/tests/ui/consts/const-negative.rs
@@ -0,0 +1,9 @@
+// run-pass
+// Issue #358
+#![allow(non_upper_case_globals)]
+
+static toplevel_mod: isize = -1;
+
+pub fn main() {
+ assert_eq!(toplevel_mod, -1);
+}