2021-08-27 11:04:57 -05:00
|
|
|
// Check that types with different const arguments are different.
|
2020-08-10 13:50:58 -05:00
|
|
|
// revisions: full min
|
|
|
|
|
2021-08-27 11:04:57 -05:00
|
|
|
#![cfg_attr(full, feature(generic_const_exprs))]
|
2020-08-10 13:50:58 -05:00
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
|
|
|
|
struct ConstUsize<const V: usize> {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut u = ConstUsize::<3> {};
|
|
|
|
u = ConstUsize::<4> {};
|
|
|
|
//~^ ERROR mismatched types
|
|
|
|
}
|