blob: 93289f933317ccca2cefe56cebdd621843db8205 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Check that different const types are different.
// revisions: full min
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(min, feature(min_const_generics))]
struct ConstUsize<const V: usize> {}
fn main() {
let mut u = ConstUsize::<3> {};
u = ConstUsize::<4> {};
//~^ ERROR mismatched types
}
|