rust/tests/ui/specialization/specialization-feature-gate-default.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
240 B
Rust
Raw Normal View History

2016-03-08 23:23:52 +00:00
// Check that specialization must be ungated to use the `default` keyword
// gate-test-specialization
trait Foo {
fn foo(&self);
}
impl<T> Foo for T {
2016-03-08 23:23:52 +00:00
default fn foo(&self) {} //~ ERROR specialization is unstable
}
fn main() {}