2020-01-09 05:56:38 -05:00
|
|
|
#![feature(negative_impls)]
|
2020-05-17 10:22:48 +02:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2017-12-02 22:15:03 +03:00
|
|
|
|
|
|
|
struct S;
|
|
|
|
struct Z;
|
|
|
|
|
2020-02-22 02:01:53 +01:00
|
|
|
default impl S {} //~ ERROR inherent impls cannot be `default`
|
2017-12-02 22:15:03 +03:00
|
|
|
|
|
|
|
default unsafe impl Send for S {} //~ ERROR impls of auto traits cannot be default
|
|
|
|
default impl !Send for Z {} //~ ERROR impls of auto traits cannot be default
|
2020-01-08 06:39:38 -05:00
|
|
|
//~^ ERROR negative impls cannot be default impls
|
2017-12-02 22:15:03 +03:00
|
|
|
|
|
|
|
trait Tr {}
|
2020-01-08 06:39:38 -05:00
|
|
|
default impl !Tr for S {} //~ ERROR negative impls cannot be default impls
|
2018-08-23 02:19:38 +03:00
|
|
|
|
|
|
|
fn main() {}
|