about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-24 01:25:57 +0000
committerbors <bors@rust-lang.org>2014-08-24 01:25:57 +0000
commit904d88c2be3e99177745fc45870304e78d610e8c (patch)
treeb90b6dbab96f0e5241bc4e8a0728c014a783fb1c
parent36131f5be403e3f89c45627498bea535d94cb619 (diff)
parented18baeb495a0f9663f81c3ad9687c775eb24270 (diff)
downloadrust-904d88c2be3e99177745fc45870304e78d610e8c.tar.gz
rust-904d88c2be3e99177745fc45870304e78d610e8c.zip
auto merge of #16697 : Sawyer47/rust/new-test, r=huonw
Closes #10618
Closes #16382
-rw-r--r--src/test/run-pass/cast-in-array-size.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/run-pass/cast-in-array-size.rs b/src/test/run-pass/cast-in-array-size.rs
new file mode 100644
index 00000000000..ce5fb672b21
--- /dev/null
+++ b/src/test/run-pass/cast-in-array-size.rs
@@ -0,0 +1,19 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
+// issues #10618 and #16382
+static SIZE: int = 25;
+
+fn main() {
+    let _a: [bool, ..1 as uint];
+    let _b: [int, ..SIZE as uint] = [1, ..SIZE as uint];
+    let _c: [bool, ..'\n' as uint] = [true, ..'\n' as uint];
+}