]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/defaults/generic-expr-default-concrete.rs
New upstream version 1.59.0+dfsg1
[rustc.git] / src / test / ui / const-generics / defaults / generic-expr-default-concrete.rs
1 #![feature(generic_const_exprs)]
2 #![allow(incomplete_features)]
3
4 struct Foo<const N: usize, const M: usize = { N + 1 }>;
5 fn no_constraining() -> Foo<10> {
6 Foo::<10, 11>
7 }
8
9 pub fn different_than_default() -> Foo<10> {
10 Foo::<10, 12>
11 //~^ error: mismatched types
12 }
13
14 fn main() {}