]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/ensure_is_evaluatable.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / const-generics / ensure_is_evaluatable.rs
1 #![feature(generic_const_exprs)]
2 #![allow(incomplete_features)]
3
4 fn foo<const N: usize, const M: usize>() -> [(); N+2]
5 where
6     [(); N + 1]:,
7     [(); M + 1]:,
8 {
9     bar()
10     //~^ ERROR: unconstrained
11 }
12
13 fn bar<const N: usize>() -> [(); N]
14 where
15     [(); N + 1]:,
16 {
17     [(); N]
18 }
19
20 fn main() {}