2016-02-23 09:48:34 -06:00
|
|
|
// Make sure specialization cannot change impl polarity
|
|
|
|
|
2020-11-22 21:54:31 -06:00
|
|
|
#![feature(auto_traits)]
|
2020-01-09 04:56:38 -06:00
|
|
|
#![feature(negative_impls)]
|
2020-05-17 03:22:48 -05:00
|
|
|
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
2015-12-28 17:40:11 -06:00
|
|
|
|
2017-12-03 06:56:53 -06:00
|
|
|
auto trait Foo {}
|
2016-02-23 09:48:34 -06:00
|
|
|
|
|
|
|
impl<T> Foo for T {}
|
2020-04-22 07:18:22 -05:00
|
|
|
impl !Foo for u8 {} //~ ERROR E0751
|
2015-12-28 17:40:11 -06:00
|
|
|
|
2017-12-03 06:56:53 -06:00
|
|
|
auto trait Bar {}
|
2015-12-28 17:40:11 -06:00
|
|
|
|
2016-02-23 09:48:34 -06:00
|
|
|
impl<T> !Bar for T {}
|
2020-04-22 07:18:22 -05:00
|
|
|
impl Bar for u8 {} //~ ERROR E0751
|
2015-12-28 17:40:11 -06:00
|
|
|
|
2016-02-23 09:48:34 -06:00
|
|
|
fn main() {}
|