summaryrefslogtreecommitdiffstats
path: root/tests/ui/generics/generic-type.rs
blob: aa46db07eee8c27f9709814dbcc60744f8541c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass



struct Pair<T> {x: T, y: T}

pub fn main() {
    let x: Pair<isize> = Pair {x: 10, y: 12};
    assert_eq!(x.x, 10);
    assert_eq!(x.y, 12);
}