rust/src/test/ui/issues/issue-27281.rs
2018-12-25 21:08:33 -07:00

18 lines
270 B
Rust

// 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() {}