2016-02-23 07:48:34 -08:00
|
|
|
// Make sure specialization cannot change impl polarity
|
|
|
|
|
2020-11-22 19:54:31 -08:00
|
|
|
#![feature(auto_traits)]
|
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
|
2015-12-28 15:40:11 -08:00
|
|
|
|
2017-12-03 10:56:53 -02:00
|
|
|
auto trait Foo {}
|
2016-02-23 07:48:34 -08:00
|
|
|
|
|
|
|
impl<T> Foo for T {}
|
2020-04-22 20:18:22 +08:00
|
|
|
impl !Foo for u8 {} //~ ERROR E0751
|
2015-12-28 15:40:11 -08:00
|
|
|
|
2017-12-03 10:56:53 -02:00
|
|
|
auto trait Bar {}
|
2015-12-28 15:40:11 -08:00
|
|
|
|
2016-02-23 07:48:34 -08:00
|
|
|
impl<T> !Bar for T {}
|
2020-04-22 20:18:22 +08:00
|
|
|
impl Bar for u8 {} //~ ERROR E0751
|
2015-12-28 15:40:11 -08:00
|
|
|
|
2016-02-23 07:48:34 -08:00
|
|
|
fn main() {}
|