]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/issue-76595.rs
Rollup merge of #106524 - compiler-errors:constructor-note, r=cjgillot
[rust.git] / tests / ui / const-generics / generic_const_exprs / issue-76595.rs
1 #![feature(generic_const_exprs)]
2 #![allow(incomplete_features)]
3
4 struct Bool<const B: bool>;
5
6 trait True {}
7
8 impl True for Bool<true> {}
9
10 fn test<T, const P: usize>() where Bool<{core::mem::size_of::<T>() > 4}>: True {
11     todo!()
12 }
13
14 fn main() {
15     test::<2>();
16     //~^ ERROR function takes 2 generic arguments
17 }