5c0b416dde
And also fix some comments as suggested by lcnr
15 lines
362 B
Rust
15 lines
362 B
Rust
// 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
|
|
}
|