]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/different_byref.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / const-generics / different_byref.rs
1 // Check that different const types are different.
2 // revisions: full min
3
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(full, allow(incomplete_features))]
6
7 struct Const<const V: [usize; 1]> {}
8 //[min]~^ ERROR `[usize; 1]` is forbidden
9
10 fn main() {
11 let mut x = Const::<{ [3] }> {};
12 x = Const::<{ [4] }> {};
13 //[full]~^ ERROR mismatched types
14 }