mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
23 lines
281 B
Rust
23 lines
281 B
Rust
trait Mirror {
|
|
type Me;
|
|
}
|
|
|
|
impl<T> Mirror for T {
|
|
type Me = T;
|
|
}
|
|
|
|
trait Foo<'a> {
|
|
const C: <&'a u32 as Mirror>::Me;
|
|
}
|
|
|
|
impl<'a, T> Foo<'a> for T {
|
|
const C: &'a u32 = &22;
|
|
}
|
|
|
|
fn foo<'a>(_: &'a u32) -> &'static u32 {
|
|
<() as Foo<'a>>::C //~ ERROR
|
|
}
|
|
|
|
fn main() {
|
|
}
|