2020-01-09 10:56:38 +00:00
|
|
|
#![feature(negative_impls)]
|
2020-05-17 08:22:48 +00:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2017-12-02 19:15:03 +00:00
|
|
|
|
|
|
|
struct S;
|
|
|
|
struct Z;
|
|
|
|
|
2020-02-22 01:01:53 +00:00
|
|
|
default impl S {} //~ ERROR inherent impls cannot be `default`
|
2017-12-02 19:15:03 +00: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 19:15:03 +00: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-22 23:19:38 +00:00
|
|
|
|
|
|
|
fn main() {}
|