summaryrefslogtreecommitdiffstats
path: root/tests/ui/specialization/specialization-feature-gate-overlap.rs
blob: b83c84ab82c01169d5865e48a54af57219fe3bdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Check that writing an overlapping impl is not allow unless specialization is ungated.

// gate-test-specialization

trait Foo {
    fn foo(&self);
}

impl<T> Foo for T {
    fn foo(&self) {}
}

impl Foo for u8 { //~ ERROR E0119
    fn foo(&self) {}
}

fn main() {}