summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issue-66451.rs
blob: 3335f7d598480c1d916fd4df3110dbcd8d78b31e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#![feature(adt_const_params)]
#![allow(incomplete_features)]

#[derive(Debug, PartialEq, Eq)]
struct Foo {
    value: i32,
    nested: &'static Bar<i32>,
}

#[derive(Debug, PartialEq, Eq)]
struct Bar<T>(T);

struct Test<const F: Foo>;

fn main() {
    let x: Test<{
        Foo {
            value: 3,
            nested: &Bar(4),
        }
    }> = Test;
    let y: Test<{
        Foo {
            value: 3,
            nested: &Bar(5),
        }
    }> = x; //~ ERROR mismatched types
}