mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
25 lines
291 B
Rust
25 lines
291 B
Rust
//@ known-bug: #74299
|
|
#![feature(specialization)]
|
|
|
|
trait X {
|
|
type U;
|
|
fn f(&self) -> Self::U {
|
|
loop {}
|
|
}
|
|
}
|
|
|
|
impl<T> X for T {
|
|
default type U = ();
|
|
}
|
|
|
|
trait Y {
|
|
fn g(&self) {}
|
|
}
|
|
|
|
impl Y for <() as X>::U {}
|
|
impl Y for <i32 as X>::U {}
|
|
|
|
fn main() {
|
|
().f().g();
|
|
}
|