diff options
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs/division.rs')
-rw-r--r-- | tests/ui/const-generics/generic_const_exprs/division.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/division.rs b/tests/ui/const-generics/generic_const_exprs/division.rs new file mode 100644 index 000000000..098fa9e04 --- /dev/null +++ b/tests/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>(); +} |