2020-05-17 03:22:48 -05:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2020-01-09 04:56:38 -06:00
|
|
|
#![feature(negative_impls)]
|
2020-01-08 05:39:38 -06:00
|
|
|
|
|
|
|
// Negative impl for u32 cannot "specialize" the base impl.
|
|
|
|
trait MyTrait {
|
|
|
|
fn foo();
|
|
|
|
}
|
|
|
|
impl<T> MyTrait for T {
|
2020-01-08 13:10:59 -06:00
|
|
|
default fn foo() {}
|
2020-01-08 05:39:38 -06:00
|
|
|
}
|
2020-04-22 07:18:22 -05:00
|
|
|
impl !MyTrait for u32 {} //~ ERROR E0751
|
2020-01-08 05:39:38 -06:00
|
|
|
|
2020-01-08 13:10:59 -06:00
|
|
|
fn main() {}
|