mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
14 lines
240 B
Rust
14 lines
240 B
Rust
// Check that specialization must be ungated to use the `default` keyword
|
|
|
|
// gate-test-specialization
|
|
|
|
trait Foo {
|
|
fn foo(&self);
|
|
}
|
|
|
|
impl<T> Foo for T {
|
|
default fn foo(&self) {} //~ ERROR specialization is unstable
|
|
}
|
|
|
|
fn main() {}
|