summaryrefslogtreecommitdiffstats
path: root/tests/ui/specialization/specialization-feature-gate-default.rs
blob: 8bad3ac0a1fb38b1b0e55de8e7dd0e09a9b8c017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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() {}