summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-37109.rs
blob: 1e57d5f95e8de0f5e0d08aa8aa2c120e5f520f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
trait ToRef<'a> {
    type Ref: 'a;
}

impl<'a, U: 'a> ToRef<'a> for U {
    type Ref = &'a U;
}

fn example<'a, T>(value: &'a T) -> (<T as ToRef<'a>>::Ref, u32) {
    (value, 0)
}

fn main() {
    example(&0);
}