]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/different_byref.rs
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[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 #![cfg_attr(min, feature(min_const_generics))]
7
8 struct Const<const V: [usize; 1]> {}
9 //[min]~^ ERROR `[usize; 1]` is forbidden
10
11 fn main() {
12     let mut x = Const::<{ [3] }> {};
13     x = Const::<{ [4] }> {};
14     //[full]~^ ERROR mismatched types
15 }