aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2772-2.rs
blob: b05f2b1dc2ba501b62c16f5c638fbff2f4736b6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-options "-w" }
#[lang = "sized"]
pub trait Sized {}

struct Pair<'a, T, U>
where
    T: 'a,
    U: 'a,
{
    left: T,
    right: U,
}

pub fn test<'a>() {
    let a: i32 = 50;
    let x = Pair::<&'_ _, &'_ _> {
        left: &&a,
        right: &a,
    };
}