summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/late-bound-vars/simple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/late-bound-vars/simple.rs')
-rw-r--r--src/test/ui/const-generics/late-bound-vars/simple.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/late-bound-vars/simple.rs b/src/test/ui/const-generics/late-bound-vars/simple.rs
new file mode 100644
index 000000000..6da5395ef
--- /dev/null
+++ b/src/test/ui/const-generics/late-bound-vars/simple.rs
@@ -0,0 +1,16 @@
+// run-pass
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+const fn inner<'a>() -> usize where &'a (): Sized {
+ 3
+}
+
+fn test<'a>() {
+ let _: [u8; inner::<'a>()];
+ let _ = [0; inner::<'a>()];
+}
+
+fn main() {
+ test();
+}