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