2021-08-27 18:04:57 +02:00
|
|
|
// Check that types with different const arguments are different.
|
2020-08-10 18:50:58 +00:00
|
|
|
// revisions: full min
|
|
|
|
|
2021-08-27 18:04:57 +02:00
|
|
|
#![cfg_attr(full, feature(generic_const_exprs))]
|
2020-08-10 18:50:58 +00: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
|
|
|
|
}
|