rust/tests/ui/issues/issue-27281.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
268 B
Rust
Raw Normal View History

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