summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/negative-impls/negative-specializes-positive-item.rs
blob: 4281eedaf631c9173ac175c84d5d44cfd04486eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
#![feature(negative_impls)]

// Negative impl for u32 cannot "specialize" the base impl.
trait MyTrait {
    fn foo();
}
impl<T> MyTrait for T {
    default fn foo() {}
}
impl !MyTrait for u32 {} //~ ERROR E0751

fn main() {}