]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-66451.rs
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / const-generics / issue-66451.rs
1 #![feature(adt_const_params)]
2 #![allow(incomplete_features)]
3
4 #[derive(Debug, PartialEq, Eq)]
5 struct Foo {
6     value: i32,
7     nested: &'static Bar<i32>,
8 }
9
10 #[derive(Debug, PartialEq, Eq)]
11 struct Bar<T>(T);
12
13 struct Test<const F: Foo>;
14
15 fn main() {
16     let x: Test<{
17         Foo {
18             value: 3,
19             nested: &Bar(4),
20         }
21     }> = Test;
22     let y: Test<{
23         Foo {
24             value: 3,
25             nested: &Bar(5),
26         }
27     }> = x; //~ ERROR mismatched types
28 }