summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/generic_const_exprs/division.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/generic_const_exprs/division.rs')
-rw-r--r--src/test/ui/const-generics/generic_const_exprs/division.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/generic_const_exprs/division.rs b/src/test/ui/const-generics/generic_const_exprs/division.rs
new file mode 100644
index 000000000..098fa9e04
--- /dev/null
+++ b/src/test/ui/const-generics/generic_const_exprs/division.rs
@@ -0,0 +1,11 @@
+// run-pass
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+fn with_bound<const N: usize>() where [u8; N / 2]: Sized {
+ let _: [u8; N / 2] = [0; N / 2];
+}
+
+fn main() {
+ with_bound::<4>();
+}