]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/different_byref.rs
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.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 }