mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
18 lines
268 B
Rust
18 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() {}
|