rust/src/test/ui/specialization/specialization-polarity.rs

17 lines
287 B
Rust
Raw Normal View History

2016-02-23 09:48:34 -06:00
// Make sure specialization cannot change impl polarity
#![feature(optin_builtin_traits)]
#![feature(specialization)]
auto trait Foo {}
2016-02-23 09:48:34 -06:00
impl<T> Foo for T {}
impl !Foo for u8 {} //~ ERROR E0748
auto trait Bar {}
2016-02-23 09:48:34 -06:00
impl<T> !Bar for T {}
impl Bar for u8 {} //~ ERROR E0748
2016-02-23 09:48:34 -06:00
fn main() {}