]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/fn_with_two_same_const_inputs.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / const-generics / fn_with_two_same_const_inputs.rs
1 // check-pass
2 #![feature(generic_const_exprs)]
3 #![allow(incomplete_features)]
4
5 const fn both(_: usize, b: usize) -> usize {
6     b
7 }
8
9 fn foo<const N: usize>()
10 where
11     [(); both(N + 1, N + 1)]:,
12 {
13     bar::<N>();
14 }
15
16 fn bar<const N: usize>()
17 where
18     [(); N + 1]:,
19 {
20 }
21
22 fn main() {}