summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-25279.rs
blob: fdc516d3761ac13b78984f1b7a6614cad86c5d27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
struct S<'a>(&'a ());

impl<'a> S<'a> {
    fn foo(self) -> &'a () {
        <Self>::bar(self)
    }

    fn bar(self) -> &'a () {
        self.0
    }
}

fn main() {
    S(&()).foo();
}