about summary refs log tree commit diff
path: root/tests/ui/lifetimes/struct-lifetime-inference-15735.rs
blob: 39e619648eb3754e5adc7a85a9510a7a611f7445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! Regression test for https://github.com/rust-lang/rust/issues/15735

//@ check-pass
#![allow(dead_code)]
struct A<'a> {
    a: &'a i32,
    b: &'a i32,
}

impl <'a> A<'a> {
    fn foo<'b>(&'b self) {
        A {
            a: self.a,
            b: self.b,
        };
    }
}

fn main() { }