blob: bef9d4b9e996f135ed81478f82b378c8c2ef448e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// checks that when we relate a `Expr::Cast` we also relate the type of the
// const argument.
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
fn foo<const N: usize>() -> [(); (true as usize) + N] {
[(); (1_u8 as usize) + N]
//~^ error: mismatched types
//~| error: unconstrained generic constant
}
fn main() {}
|