rust/src/test/ui/issues/issue-27281.rs
2019-07-03 06:30:28 +09:00

18 lines
305 B
Rust

// build-pass (FIXME(62277): could be 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() {}