rust/tests/ui/specialization/specialization-polarity.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
358 B
Rust
Raw Normal View History

2016-02-23 15:48:34 +00:00
// Make sure specialization cannot change impl polarity
#![feature(auto_traits)]
#![feature(negative_impls)]
2020-05-17 08:22:48 +00:00
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
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
auto trait Bar {}
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
2016-02-23 15:48:34 +00:00
fn main() {}