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