mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
14 lines
335 B
Rust
14 lines
335 B
Rust
// Check that types with different const arguments are different.
|
|
// revisions: full min
|
|
|
|
#![cfg_attr(full, feature(generic_const_exprs))]
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
struct ConstUsize<const V: usize> {}
|
|
|
|
fn main() {
|
|
let mut u = ConstUsize::<3> {};
|
|
u = ConstUsize::<4> {};
|
|
//~^ ERROR mismatched types
|
|
}
|