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
|
|
|
|
2025-02-28 01:28:32 +00: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
|
|
|
|
|
//~| ERROR negative impls cannot be default impls
|
|
|
|
|
//~| ERROR `!Send` impl requires `Z: Send` but the struct it is implemented for does not
|
2017-12-02 22:15:03 +03:00
|
|
|
|
|
|
|
|
trait Tr {}
|
2025-02-28 01:28:32 +00:00
|
|
|
|
|
|
|
|
default impl !Tr for S {}
|
|
|
|
|
//~^ ERROR negative impls cannot be default impls
|
2018-08-23 02:19:38 +03:00
|
|
|
|
|
|
|
|
fn main() {}
|