summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-23833.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/issue-23833.rs')
-rw-r--r--tests/ui/consts/issue-23833.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/consts/issue-23833.rs b/tests/ui/consts/issue-23833.rs
new file mode 100644
index 000000000..d4128fa54
--- /dev/null
+++ b/tests/ui/consts/issue-23833.rs
@@ -0,0 +1,15 @@
+// run-pass
+#![allow(unused_imports)]
+use std::fmt;
+
+const A_I8_T
+ : [u32; (i8::MAX as i8 - 1i8) as usize]
+ = [0; (i8::MAX as usize) - 1];
+
+fn main() {
+ foo(&A_I8_T[..]);
+}
+
+fn foo<T:fmt::Debug>(x: T) {
+ println!("{:?}", x);
+}