aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2772-1.rs
blob: 69977db0bfb59e7eb4af5a6e54ef3fedb55843ad (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,
    };
}