mirror of
https://git.proxmox.com/git/rustc
synced 2025-05-02 19:32:01 +00:00
12 lines
263 B
Rust
12 lines
263 B
Rust
// Check that different const types are different.
|
|
#![feature(adt_const_params)]
|
|
#![allow(incomplete_features)]
|
|
|
|
struct Const<const V: [usize; 1]> {}
|
|
|
|
fn main() {
|
|
let mut x = Const::<{ [3] }> {};
|
|
x = Const::<{ [4] }> {};
|
|
//~^ ERROR mismatched types
|
|
}
|