summary refs log tree commit diff
path: root/src/test/ui/issues/issue-27281.rs
blob: 8403d9b450787c2c3ae8be6956e0c8c2c2a99378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// compile-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() {}