summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/defaults/generic-expr-default-concrete.rs
blob: f082bd8d2e9ff5b9c2826f5f01b8f819c920ef8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]

struct Foo<const N: usize, const M: usize = { N + 1 }>;
fn no_constraining() -> Foo<10> {
    Foo::<10, 11>
}

pub fn different_than_default() -> Foo<10> {
    Foo::<10, 12>
    //~^ error: mismatched types
}

fn main() {}