blob: 52cea51aae15cf03424d0d08ad95a756d0da2089 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#![feature(generic_const_exprs, const_generics_defaults)]
#![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() {}
|