mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
16 lines
185 B
Rust
16 lines
185 B
Rust
// build-pass
|
|
#![allow(dead_code)]
|
|
trait Inner {
|
|
type T;
|
|
}
|
|
|
|
impl<'a> Inner for &'a i32 {
|
|
type T = i32;
|
|
}
|
|
|
|
fn f<'a>(x: &'a i32) -> <&'a i32 as Inner>::T {
|
|
*x
|
|
}
|
|
|
|
fn main() {}
|