summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-negative.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/consts/const-negative.rs')
-rw-r--r--src/test/ui/consts/const-negative.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-negative.rs b/src/test/ui/consts/const-negative.rs
new file mode 100644
index 000000000..1cb560936
--- /dev/null
+++ b/src/test/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);
+}