mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
22 lines
445 B
Rust
22 lines
445 B
Rust
trait Trait {
|
|
type Ty;
|
|
const CT: ();
|
|
fn fn_(&self);
|
|
}
|
|
|
|
impl<T> Trait for T {
|
|
default type Ty = (); //~ ERROR specialization is experimental
|
|
default const CT: () = (); //~ ERROR specialization is experimental
|
|
default fn fn_(&self) {} //~ ERROR specialization is experimental
|
|
}
|
|
|
|
trait OtherTrait {
|
|
fn fn_();
|
|
}
|
|
|
|
default impl<T> OtherTrait for T { //~ ERROR specialization is experimental
|
|
fn fn_() {}
|
|
}
|
|
|
|
fn main() {}
|