summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-27281.rs
blob: 717d8b2c2aa372261afae6520033aba570cd9f75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// check-pass
pub trait Trait<'a> {
    type T;
    type U;
    fn foo(&self, s: &'a ()) -> &'a ();
}

impl<'a> Trait<'a> for () {
    type T = &'a ();
    type U = Self::T;

    fn foo(&self, s: &'a ()) -> &'a () {
        let t: Self::T = s; t
    }
}

fn main() {}