rust/tests/ui/issues/issue-27281.rs
2023-01-11 09:32:08 +00:00

17 lines
268 B
Rust

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