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